Files
ims/db/ops/2026-10-15-trucks-site-id.sql
T
2026-10-15 11:44:37 +08:00

6 lines
240 B
PL/PgSQL

-- Apply by hand on the server DB with the owner's go-ahead. Not run by deploy.
BEGIN;
ALTER TABLE trucks ADD COLUMN IF NOT EXISTS site_id UUID REFERENCES sites(id);
CREATE INDEX IF NOT EXISTS trucks_site_id_idx ON trucks(site_id);
COMMIT;