feat(group-booking): draft schedules, coach-scoped seating, mixed classes

This commit is contained in:
Abubeker Yasin
2026-09-08 16:07:46 +03:00
parent b08fc85aaf
commit 3fb019fd07
28 changed files with 1068 additions and 107 deletions

View File

@@ -0,0 +1,13 @@
-- Adds the DRAFT value to passenger."TripStatus".
--
-- This migration deliberately contains NOTHING ELSE. Postgres cannot use a newly added enum
-- value inside the same transaction that adds it, and Prisma wraps each migration file in one
-- transaction — so any DDL or DML that references 'DRAFT' must live in a LATER migration file.
--
-- IF NOT EXISTS makes it idempotent, so a re-run (or a database where it was applied out of
-- band) is a no-op rather than a failure.
--
-- BEFORE 'SCHEDULED' keeps the physical enum order identical to the declaration order in
-- schema.prisma, so `prisma migrate diff` sees no drift. (PG 15 here; ADD VALUE ... BEFORE has
-- been available since 9.1 and IF NOT EXISTS since 12.)
ALTER TYPE passenger."TripStatus" ADD VALUE IF NOT EXISTS 'DRAFT' BEFORE 'SCHEDULED';