feat: Enhance reservation functionality

This commit is contained in:
2026-04-22 10:23:22 -04:00
parent 7f1e82acc2
commit 534d66c774
25 changed files with 1236 additions and 91 deletions

View File

@@ -0,0 +1,12 @@
-- The overlap exclusion constraint must not apply to cancelled reservations,
-- so that a cancelled slot can be re-booked by another member.
alter table public.reservations
drop constraint no_overlapping_reservations;
alter table public.reservations
add constraint no_overlapping_reservations
exclude using gist (
boat_id with =,
tstzrange(start_time, end_time, '[)') with &&
) where (status <> 'cancelled');