- Migration 20: collapse `Nairobi`/`nairobi` in domain.vehicles → 'nairobi' - Remove the SLO panel from the top band (filter + tile rows stay) - Offline vehicles render as solid grey instead of dim-cost-centre tint; opacity now only differentiates moving (1.0) vs parked (0.75) vs offline (0.55) so colour carries identity + state cleanly
16 lines
617 B
SQL
16 lines
617 B
SQL
-- migrate:up
|
|
--
|
|
-- Data hygiene: 1 vehicle had `assigned_city = 'Nairobi'` while the other
|
|
-- 54 had `'nairobi'`. Collapse to lower-case so the filter dropdown shows
|
|
-- a single canonical option. The projector doesn't set assigned_city (it
|
|
-- comes from manual edits / roster imports) so no other code change is
|
|
-- needed to prevent recurrence.
|
|
|
|
UPDATE domain.vehicles
|
|
SET assigned_city = trim(lower(assigned_city)),
|
|
updated_at = now()
|
|
WHERE assigned_city IS NOT NULL
|
|
AND assigned_city != trim(lower(assigned_city));
|
|
|
|
-- migrate:down
|
|
-- No-op: re-introducing inconsistent casing would be a regression.
|