Database design to store bookings that span more than one day from X o’clock to Y o’clock
I am building an application that allows users to book a room for one day or more, and for specific hours during the day. Say for example person A books the room from Sunday to Thursday from 4 PM to 6 PM, and Person B books it from Sunday to Thursday 7 PM to 10 PM.
Database design to store bookings that span more than one day from X o’clock to Y o’clock
I am building an application that allows users to book a room for one day or more, and for specific hours during the day. Say for example person A books the room from Sunday to Thursday from 4 PM to 6 PM, and Person B books it from Sunday to Thursday 7 PM to 10 PM.
Database design to store bookings that span more than one day from X o’clock to Y o’clock
I am building an application that allows users to book a room for one day or more, and for specific hours during the day. Say for example person A books the room from Sunday to Thursday from 4 PM to 6 PM, and Person B books it from Sunday to Thursday 7 PM to 10 PM.
Limiting insertion into Supabase table with same values using RLS policies
I have a payments
table which has a foreign key to a table called bundles
, the payments
table has the methods is_successful, bundle_id and user_id (the rest are irrelevant).
I need to not allow a user to pay for the same bundle twice (or a disabled bundle), this means not allow them to insert into payments
table if it already has a row with their auth.uid() and the same bundle_id and is_successful set to true.