MTG Copilot Docs
Data model

Precon deck cards

The card list of each preconstructed deck, linking a precon to its printings.

9 columns. Every value below is generated from the provenance registry.

FieldTypeSourceUpdatedWritten by
idstringcalculatedneverdatabase
Internal UUID primary key.
deck_idstringmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Owning precon deck (FK, cascade).
printing_idstring | nullmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Exact printing (FK via mtgjson_uuid crosswalk); NULL when unmatched.
card_idstring | nullmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Oracle-level card (FK via the printing's oracle id); NULL when unmatched.
mtgjson_uuidstringmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Source MTGJSON uuid — kept even when unjoinable, so no data is dropped.
card_namestringmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Source card name (renders unmatched rows honestly).
quantitynumbermtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Copy count in the product.
boardstringmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
commander | main | side | token | plane | scheme.
is_foilbooleanmtgjsonon set releasescripts/ingest-mtgjson.ts (precons)
Foil printing in the product.

TypeScript model

interface precon_deck_cards {
  id:           string
  deck_id:      string
  printing_id:  string | null
  card_id:      string | null
  mtgjson_uuid: string
  card_name:    string
  quantity:     number
  board:        string
  is_foil:      boolean
}

On this page