Back in 2024, we had an exclusion constraint on the drap.draft.active_period column to ensure that concurrent writes to the draft table do not accidentally create two new drafts; only one must succeed while other writes fail. But when we introduced Drizzle ORM in 2025, we lost this exclusion constraint because Drizzle doesn't support the syntax (yet!).
|
// TODO: Exclusive index range for `activePeriod`. |
Back in 2024, we had an exclusion constraint on the
drap.draft.active_periodcolumn to ensure that concurrent writes to the draft table do not accidentally create two new drafts; only one must succeed while other writes fail. But when we introduced Drizzle ORM in 2025, we lost this exclusion constraint because Drizzle doesn't support the syntax (yet!).drap/src/lib/server/database/schema/app.ts
Line 91 in b5b2343