Go to file
jordi fita mas 7eb718dfd9 Allow many campsites for each reservation
This is actually only used for plots, but, of course, it means that
every booking now can potentially have many booked campsites, and have
to create a relation for it.

I now have a conundrum regarding stay dates: i need them to be in the
same table as the campsite_id, because constraints only work on a single
relation and without the dates i can not make sure that i am not
overbooking a given campsite; but, on the other hand, all campsites
under the same booking must be for the same dates.

Where does stay belong, then? In booking or booking_campsite? If in
booking then i can not have a constraint that most assuredly will bite
me in the back, but if in booking_campsite then each campsite could
potentially have different dates.

As far as i can see, i can not use a exclude constraint with <> for
dates in booking_campsite to ensure that all rows with the same
booking_id have the same stay (i.e., exclude those that have a different
stay for the same booking_id).

For now, the say is in **both** relations: in booking, because i need it
when it is a prebooking, at least, and in booking_campsite for the
aforementioned constraint requirements.

Will this come back and bite me? Yes, it will. But what can i do?
2024-04-21 21:28:41 +02:00
cmd/camper Increase HTTP timeout 2024-03-05 12:05:00 +01:00
debian Tag database with version 7 2024-04-03 09:34:36 +02:00
demo Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
deploy Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
pkg Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
po Show booking on booking grid 2024-04-19 21:09:28 +02:00
revert Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
test Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
verify Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00
web Show booking on booking grid 2024-04-19 21:09:28 +02:00
.gitignore Add the sample campsite types to the demo file 2023-09-10 03:57:46 +02:00
Makefile Send an email on notification of success payment 2024-02-13 05:20:35 +01:00
go.mod Copy RecordArray from pgtype to database 2023-09-12 21:58:30 +02:00
go.sum Copy RecordArray from pgtype to database 2023-09-12 21:58:30 +02:00
guix.scm Add Guix package definition 2024-01-28 18:12:38 +01:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Allow many campsites for each reservation 2024-04-21 21:28:41 +02:00