Fix migration

This commit is contained in:
Roba Boru
2026-07-19 18:29:23 +03:00
parent 1804fba5bb
commit 1e08f98705

View File

@@ -0,0 +1,10 @@
-- Repair: add Route.checkinMinutesBefore and RouteStop.checkinMinutesBefore.
-- Migrations 20260717000001 and 20260717000002 were marked as "applied directly"
-- with empty SQL files, so these columns were never added to the deployed database.
-- P2022 (column does not exist) on Route.checkinMinutesBefore causes every
-- POST /search to fail with 500.
-- Uses IF NOT EXISTS so this migration is safe to run on databases where the
-- columns already exist.
ALTER TABLE passenger."Route" ADD COLUMN IF NOT EXISTS "checkinMinutesBefore" INTEGER NOT NULL DEFAULT 30;
ALTER TABLE passenger."RouteStop" ADD COLUMN IF NOT EXISTS "checkinMinutesBefore" INTEGER;