fix(db): give the holiday stamping backfill its own migration version and reuse the stamping path #244
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#244
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P3 follow-up from PR #178 review pass 4 (both axes).
Finding
The version key is reused. The migration step that stamps past
is_holiday=1entries with no business-day record (app/db/database.py~513-568) is registered under20261002_holiday_backfill. That is the same version an earlier PR #178 head (a420921) already recorded without this step. Any database that rana420921skips it, so its never-stamped holidays still split the readers.The stamping logic is copied. The step re-implements stamping inline:
planned_forandopening_hours_by_schedule."04:00","10:00","18:00"and"Feriado"instead ofDEFAULT_RESET_TIME,DEFAULT_HOLIDAY_HOURSandconfigured_holiday_hours.asdict(BusinessDaySchedule).The resolver and the migration can drift apart, and the pass-3 fix reply said records are created "strictly through the stamping path".
Acceptance Criteria
stamp_business_day_schedules_async. No duplicated literals.20261002_holiday_backfillalready recorded and an unstamped past holiday gets a record and aSTAMPaudit row on startup.