Racecard Backfill
Runs an active foreign-key repair — not just a passive check — across
racecard_meeting and racecard_race, in that order (race depends
on meeting). racecard_runner (~31M rows) has its own page,
Racecard Runner Backfill. For every row, this recomputes what each FK
(course_id, country_id, feature_race_id,
racecard_meeting_id) should actually resolve to from the
current source row and its existing parent mappings, and corrects the
column if it disagrees. It only updates existing rows — a parent with
no mapping yet is left alone and counted as unresolvable, never created. This is the
opposite of
Backfill Reference Tables and
unlike Backfill Everything
(which never touches an FK/id column at all) — this page's whole purpose is fixing FKs,
plus an ordinary value-diff refresh of every other mapped column on the same rows in the
same pass.
By default a run covers rows with race_date on or after
the latest 7 days; untick the box below for a full run over all
dates. Scheduled runs always use the latest-7-days filter. A
racecard_meeting/racecard_race parent that's itself outside the
run's date range is left unresolved.
- Racecard Meetings tblprerace_meetings → racecard_meeting
- Racecard Races tblprerace_races → racecard_race
Preview runs the exact same reads and resolves the exact same expected values, but skips every write — no FK repointed, no value columns refreshed. Use it to see what would change before committing to a real run.
Scheduled Backfill
Runs this same active FK repair + value backfill automatically on a recurring interval,
always scoped to the same fixed race_date within the latest 7 days window — instead of
only ever running it by hand. A scheduled run is skipped (and retried shortly after) if
any sync job is currently mid-tick, so it never runs alongside one.