fleet-platform/db/migrations/20260601000008_live_positions_richer.sql
kianiadee 6c5ba3b22b
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions
UI: arrow + plate-short label + cost-centre marker palette + hover popup; richer state.live_positions + serve.fn_live_view v2; multi-target poll plumbing
2026-05-23 09:29:04 +03:00

31 lines
1.1 KiB
SQL

-- migrate:up
ALTER TABLE state.live_positions
ADD COLUMN IF NOT EXISTS mc_type text,
ADD COLUMN IF NOT EXISTS current_mileage_km numeric,
ADD COLUMN IF NOT EXISTS gps_signal int,
ADD COLUMN IF NOT EXISTS satellites int,
ADD COLUMN IF NOT EXISTS device_name text,
ADD COLUMN IF NOT EXISTS pos_type text;
ALTER TABLE state.position_history
ADD COLUMN IF NOT EXISTS mc_type text,
ADD COLUMN IF NOT EXISTS current_mileage_km numeric,
ADD COLUMN IF NOT EXISTS gps_signal int,
ADD COLUMN IF NOT EXISTS pos_type text;
-- migrate:down
ALTER TABLE state.live_positions
DROP COLUMN IF EXISTS mc_type,
DROP COLUMN IF EXISTS current_mileage_km,
DROP COLUMN IF EXISTS gps_signal,
DROP COLUMN IF EXISTS satellites,
DROP COLUMN IF EXISTS device_name,
DROP COLUMN IF EXISTS pos_type;
ALTER TABLE state.position_history
DROP COLUMN IF EXISTS mc_type,
DROP COLUMN IF EXISTS current_mileage_km,
DROP COLUMN IF EXISTS gps_signal,
DROP COLUMN IF EXISTS pos_type;