mtgcoll/resources/migrations/00001_sets_table.up.sql
Gered aca45d9631 major reworking of various data and image importing/scraping operations
can now run the application from the command line to invoke the various
data import/update or image scraping operations.

removed all copies of scraped set/symbol/mana images
2016-06-28 19:16:04 -04:00

19 lines
703 B
SQL

CREATE TABLE sets (
code TEXT PRIMARY KEY,
name TEXT NOT NULL,
gatherer_code TEXT,
old_code TEXT,
magic_cards_info_code TEXT,
release_date DATE,
border TEXT NOT NULL CHECK (border IN ('white', 'black', 'silver')),
type TEXT NOT NULL,
block TEXT,
online_only BOOLEAN NOT NULL
);
CREATE INDEX sets_name_idx ON sets (name);
CREATE INDEX sets_gatherer_code_idx ON sets (gatherer_code);
CREATE INDEX sets_magic_cards_info_code_idx ON sets (magic_cards_info_code);
CREATE INDEX sets_release_date_idx ON sets (release_date);
CREATE INDEX sets_type_idx ON sets (type);