Data model
Precon decks
Preconstructed decks as shipped by Wizards, with their commanders and metadata.
11 columns. Every value below is generated from the provenance registry.
| Field | Type | Source | Updated | Written by |
|---|---|---|---|---|
| id | string | calculated | never | database |
| Internal UUID primary key. | ||||
| file_name | string | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| MTGJSON DeckList fileName — the unique product identity. | ||||
| name | string | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| Product display name. | ||||
| set_code | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| Owning set (FK to sets); NULL when MTGJSON's deck code isn't a known set. | ||||
| release_date | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| Product release date. | ||||
| deck_type | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| Product type (Commander Deck, Jumpstart, Secret Lair Drop, …). | ||||
| source_url | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (precons) |
| MTGJSON-provided source/reference URL. | ||||
| card_count | number | calculated | on set release | refresh_precon_summaries(), called by scripts/mtgjson/precons.ts, scripts/mtgjson/relink.ts and the card chain |
| Commander and main-deck cards, counting copies. | ||||
| commander_name | string | null | calculated | on set release | refresh_precon_summaries(), called by scripts/mtgjson/precons.ts, scripts/mtgjson/relink.ts and the card chain |
| The commanders' names in name order, joined with " // "; null without a commander. | ||||
| commander_image | string | null | calculated | on set release | refresh_precon_summaries(), called by scripts/mtgjson/precons.ts, scripts/mtgjson/relink.ts and the card chain |
| The first commander's card image, by name; null without one. | ||||
| color_identity | string[] | calculated | on set release | refresh_precon_summaries(), called by scripts/mtgjson/precons.ts, scripts/mtgjson/relink.ts and the card chain |
| The union of the commanders' colour identities; empty without a commander. | ||||
TypeScript model
interface precon_decks {
id: string
file_name: string
name: string
set_code: string | null
release_date: string | null
deck_type: string | null
source_url: string | null
card_count: number
commander_name: string | null
commander_image: string | null
color_identity: string[]
}