mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 10:58:14 +00:00
feat(group-booking): draft schedules, coach-scoped seating, mixed classes
This commit is contained in:
@@ -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';
|
||||
Reference in New Issue
Block a user