Data model
Sets
Magic set metadata: codes, names, release dates, and printing counts.
7 columns. Every value below is generated from the provenance registry.
| Field | Type | Source | Updated | Written by |
|---|---|---|---|---|
| code | string | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| Lowercase set code (matches card_printings.set_code); primary key. | ||||
| name | string | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| Set display name (from printings for placeholder rows). | ||||
| release_date | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| Set release date; NULL on placeholder rows. | ||||
| set_type | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| MTGJSON set type (expansion, core, commander, masters, promo…). | ||||
| parent_set_code | string | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| Parent set code for child sets (promos, tokens). | ||||
| card_count | number | null | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| Total cards in the set per MTGJSON. | ||||
| mtgjson_known | boolean | mtgjson | on set release | scripts/ingest-mtgjson.ts (sets) |
| False for placeholder rows covering printing set-codes MTGJSON lacks (Scryfall-only promo/token codes). | ||||
TypeScript model
interface sets {
code: string
name: string
release_date: string | null
set_type: string | null
parent_set_code: string | null
card_count: number | null
mtgjson_known: boolean
}