MTG Copilot Docs
Data model

Precon value history

Each precon deck's total TCGplayer value per day and per week, behind the precon page's value chart.

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

FieldTypeSourceUpdatedWritten by
deck_idstringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
The precon deck (FK → precon_decks.id).
bucketstringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
daily, one point per day of the daily series; or weekly, one per week of the weekly series.
daystringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
The day of a daily point, or the Monday of a weekly one.
centsnumbercalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
Sum over the deck's cards of each card's printing price times its quantity: the daily TCGplayer retail USD normal-finish price, or the weekly close. In cents.

TypeScript model

interface precon_value_points {
  deck_id: string
  bucket:  string
  day:     string
  cents:   number
}

On this page