Data model
Card popularity
EDHREC play rank per card, kept apart from the card so refreshing it is cheap.
3 columns. Every value below is generated from the provenance registry.
| Field | Type | Source | Updated | Written by |
|---|---|---|---|---|
| scryfall_oracle_id | string | scryfall | weekly | scripts/seed-cards.ts |
| Oracle card key (FK → cards.scryfall_oracle_id). | ||||
| edhrec_rank | number | null | scryfall | weekly | scripts/seed-cards.ts |
| EDHREC popularity rank; lower is more played. Null where EDHREC has no ranking. | ||||
| updated_at | string | scryfall | weekly | scripts/seed-cards.ts |
| When this rank last changed. Only moved ranks are written, so this is a real signal. | ||||
The rank sits here rather than on the card because it moves for roughly four
cards in five every month, and every write to cards costs its whole index set.
Name search uses it as the tiebreak among equally good name matches, which is
why a staple appears above an obscure card of the same name.
A null rank means EDHREC has no play data. That is normal for tokens and for cards from a set too new to have any.
TypeScript model
interface card_popularity {
scryfall_oracle_id: string
edhrec_rank: number | null
updated_at: string
}