Back to Source Monitor

Data Migration and Source Model Updates

.vbw-planning/milestones/ui-fixes-and-smart-scraping/phases/05-simplify-source-status/01-SUMMARY.md

0.13.01.3 KB
Original Source

What Was Built

Reversible data migration that simplifies health_status from 7 values (healthy, auto_paused, unknown, warning, critical, declining, improving) down to 4 (working, failing, declining, improving). Updated Source model default from "healthy" to "working".

Commits

HashMessage
0e581b0feat(migration): rename health_status values from 7 to 4 statuses
6ffc07cfeat(model): change Source health_status default to working
52c0f95chore(dummy): run health_status migration on dummy app

Tasks Completed

  1. Created reversible migration 20260312120000_simplify_health_status_values.rb that maps healthy/auto_paused/unknown to "working" and warning/critical to "failing" (declining/improving unchanged)
  2. Updated Source model default health_status from "healthy" to "working"
  3. Ran migration on dummy app (schema.rb updated)

Files Modified

  • db/migrate/20260312120000_simplify_health_status_values.rb (new)
  • app/models/source_monitor/source.rb (default changed)
  • test/dummy/db/schema.rb (migration applied)

Deviations

  • Schema.rb diff included additional columns/indexes from pending migrations on main that hadn't been applied to the dummy DB yet. These are unrelated to this plan but were picked up during db:migrate.