I have a Supabase database where a master 'Booking' table is linked to a child 'Events' tables, where a booking can have multiple events.
My app allows the booking to be deleted, and I have set up a cascading association so that when the booking is deleted all associated events are also deleted.
However, the app also allows events to be deleted, and I was wondering if there is smart way of deleting the booking if all the associated events are deleted?