From 1e08f98705b231d140f87a873a65c9170ab375ac Mon Sep 17 00:00:00 2001 From: Roba Boru Date: Sun, 19 Jul 2026 18:29:23 +0300 Subject: [PATCH] Fix migration --- .../migration.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 apps/edr-passenger-api/prisma/migrations/20260719000002_repair_route_checkin_minutes/migration.sql diff --git a/apps/edr-passenger-api/prisma/migrations/20260719000002_repair_route_checkin_minutes/migration.sql b/apps/edr-passenger-api/prisma/migrations/20260719000002_repair_route_checkin_minutes/migration.sql new file mode 100644 index 000000000..71005c8ea --- /dev/null +++ b/apps/edr-passenger-api/prisma/migrations/20260719000002_repair_route_checkin_minutes/migration.sql @@ -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;