0ms elapsed

Table [migration]

1 rows returned
createdidxsrctitle
2025-10-01 20:09:301 -- -- -- -- skipping definition of enum [ability_word], since SQLite does not support custom types -- skipping definition of enum [border], since SQLite does not support custom types -- skipping definition of enum [card_type], since SQLite does not support custom types -- skipping definition of enum [color], since SQLite does not support custom types -- skipping definition of enum [color_combo], since SQLite does not support custom types -- skipping definition of enum [deck_location], since SQLite does not support custom types -- skipping definition of enum [deck_type], since SQLite does not support custom types -- skipping definition of enum [finish], since SQLite does not support custom types -- skipping definition of enum [frame], since SQLite does not support custom types -- skipping definition of enum [frame_effect], since SQLite does not support custom types -- skipping definition of enum [identifier_type], since SQLite does not support custom types -- skipping definition of enum [keyword_ability], since SQLite does not support custom types -- skipping definition of enum [keyword_action], since SQLite does not support custom types -- skipping definition of enum [lang], since SQLite does not support custom types -- skipping definition of enum [layout], since SQLite does not support custom types -- skipping definition of enum [legal_status], since SQLite does not support custom types -- skipping definition of enum [provider], since SQLite does not support custom types -- skipping definition of enum [rarity], since SQLite does not support custom types -- skipping definition of enum [ruling_source], since SQLite does not support custom types -- skipping definition of enum [security_stamp], since SQLite does not support custom types -- skipping definition of enum [set_type], since SQLite does not support custom types -- skipping definition of enum [subtype], since SQLite does not support custom types -- skipping definition of enum [supertype], since SQLite does not support custom types -- skipping definition of enum [sync_status], since SQLite does not support custom types -- skipping definition of enum [watermark], since SQLite does not support custom types -- -- create table if not exists "artist" ( "id" uuid not null, "name" text not null, "aka" jsonb not null, primary key ("id") ); -- -- create table if not exists "audit" ( "id" uuid not null, "message" text not null, "created" timestamp not null default current_timestamp, primary key ("id") ); -- -- create table if not exists "set" ( "id" text not null, "name" text not null, "icon" text not null, "set_type" set_type not null, "released_at" timestamp not null, "block_code" text not null, "block" text not null, "parent_set_code" text not null, "mtgo_code" text not null, "arena_code" text not null, "scryfall_id" uuid not null, "tcgplayer_id" int not null, "card_count" int not null, "printed_size" int not null, "digital" boolean not null, "foil_only" boolean not null, "nonfoil_only" boolean not null, "scryfall_uri" text not null, "scryfall_api" text not null, "icon_svg_uri" text not null, "search_uri" text not null, primary key ("id") ); -- -- create table if not exists "card" ( "id" uuid not null, "name" text not null, "text" text not null, "card_types" jsonb not null, "type_line" text not null, "subtypes" jsonb not null, "supertypes" jsonb not null, "color_identity" jsonb not null, "color_indicator" jsonb not null, "colors" jsonb not null, "mana_cost" text not null, "mana_value" double precision not null, "cmc" double precision not null, "keywords" jsonb not null, "power" text not null, "toughness" text not null, "loyalty" text not null, "life" text not null, "defense" text not null, "layout" layout not null, "hand" text not null, "first_printing" text not null, "leadership_skills" jsonb not null, "alt_deck_limit" text not null, "reserved" boolean not null, "has_foil" boolean not null, "has_non_foil" boolean not null, "starter" boolean not null, "funny" boolean not null, "edhrec_rank" int not null, "edhrec_saltiness" int not null, foreign key ("first_printing") references "set" ("id"), primary key ("id") ); create index if not exists "card__first_printing_idx" on "card" ("first_printing"); -- -- create table if not exists "deck" ( "id" text not null, "name" text not null, "set_id" text not null, "release_date" timestamp not null, "deck_type" deck_type not null, "source" text not null, foreign key ("set_id") references "set" ("id"), primary key ("id") ); create index if not exists "deck__set_id_idx" on "deck" ("set_id"); -- -- create table if not exists "variant" ( "id" uuid not null, "set_id" text not null, "collector_number" text not null, "card_id" uuid not null, "artist" text not null, "illustration_id" uuid not null, "card_back" text not null, "rarity" rarity not null, "border" border not null, "frame" frame not null, "frame_effects" jsonb not null, "finishes" jsonb not null, "security_stamp" security_stamp not null, "watermark" watermark not null, "attraction_lights" jsonb not null, "lang" lang not null, "flavor_name" text not null, "flavor_text" text not null, "name" text not null, "text" text not null, "type_line" text not null, "explicit" boolean not null, "released_at" timestamp not null, "reprint" boolean not null, "full_art" boolean not null, "story_spotlight" boolean not null, "oversized" boolean not null, "digital" boolean not null, "booster" boolean not null, "promo" boolean not null, "promo_types" text not null, foreign key ("set_id") references "set" ("id"), foreign key ("card_id") references "card" ("id"), primary key ("id") ); create index if not exists "variant__set_id_idx" on "variant" ("set_id"); create index if not exists "variant__card_id_idx" on "variant" ("card_id"); -- -- create table if not exists "deck_variant" ( "deck_id" text not null, "idx" int not null, "location" deck_location not null, "variant_id" uuid not null, foreign key ("deck_id") references "deck" ("id"), foreign key ("variant_id") references "variant" ("id"), primary key ("deck_id", "idx") ); create index if not exists "deck_variant__deck_id_idx" on "deck_variant" ("deck_id"); create index if not exists "deck_variant__idx_idx" on "deck_variant" ("idx"); create index if not exists "deck_variant__location_idx" on "deck_variant" ("location"); create index if not exists "deck_variant__variant_id_idx" on "deck_variant" ("variant_id"); -- -- create table if not exists "face" ( "card_id" uuid not null, "key" text not null, "name" text not null, "text" text not null, "flavor_text" text not null, "card_types" jsonb not null, "type_line" text not null, "subtypes" jsonb not null, "supertypes" jsonb not null, "color_identity" jsonb not null, "color_indicator" jsonb not null, "colors" jsonb not null, "mana_cost" text not null, "mana_value" double precision not null, "cmc" double precision not null, "keywords" jsonb not null, "power" text not null, "toughness" text not null, "loyalty" text not null, "life" text not null, "defense" text not null, "illustration_id" text not null, "layout" layout not null, foreign key ("card_id") references "card" ("id"), primary key ("card_id", "key") ); create index if not exists "face__card_id_idx" on "face" ("card_id"); create index if not exists "face__key_idx" on "face" ("key"); -- -- create table if not exists "legality" ( "variant_id" uuid not null, "alchemy" legal_status not null, "brawl" legal_status not null, "commander" legal_status not null, "duel" legal_status not null, "explorer" legal_status not null, "future" legal_status not null, "gladiator" legal_status not null, "historic" legal_status not null, "historic_brawl" legal_status not null, "legacy" legal_status not null, "modern" legal_status not null, "oathbreaker" legal_status not null, "old_school" legal_status not null, "pauper" legal_status not null, "pauper_commander" legal_status not null, "penny" legal_status not null, "pioneer" legal_status not null, "predh" legal_status not null, "premodern" legal_status not null, "standard" legal_status not null, "timeless" legal_status not null, "vintage" legal_status not null, foreign key ("variant_id") references "variant" ("id"), primary key ("variant_id") ); -- -- create table if not exists "ruling" ( "id" uuid not null, "card_id" uuid not null, "source" ruling_source not null, "published_at" timestamp not null, "comment" text not null, foreign key ("card_id") references "card" ("id"), primary key ("id") ); create index if not exists "ruling__card_id_idx" on "ruling" ("card_id"); -- -- create table if not exists "status" ( "filename" text not null, "provider" provider not null, "status" sync_status not null, "comment" text not null, "data" jsonb not null, "created" timestamp not null default current_timestamp, "updated" timestamp default current_timestamp, primary key ("filename") ); -- -- create table if not exists "variant_artist" ( "variant_id" uuid not null, "artist_id" uuid not null, foreign key ("variant_id") references "variant" ("id"), foreign key ("artist_id") references "artist" ("id"), primary key ("variant_id", "artist_id") ); create index if not exists "variant_artist__variant_id_idx" on "variant_artist" ("variant_id"); create index if not exists "variant_artist__artist_id_idx" on "variant_artist" ("artist_id"); -- -- -- -- insert into "audit" ( "id", "message", "created" ) values ( '10000000-0000-0000-0000-000000000000', 'The very first audit log!', current_timestamp ) on conflict do nothing; -- -- insert into "set" ( "id", "name", "icon", "set_type", "released_at", "block_code", "block", "parent_set_code", "mtgo_code", "arena_code", "scryfall_id", "tcgplayer_id", "card_count", "printed_size", "digital", "foil_only", "nonfoil_only", "scryfall_uri", "scryfall_api", "icon_svg_uri", "search_uri" ) values ( 'none', 'None', 'star', 'unknown', '2023-10-31', '', '', '', '', '', '', 0, 0, 0, false, false, false, '', '', '', '' ) on conflict do nothing; -- -- -- create initial database