You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default Supabase, foreign keys have either RESTRICT or NO ACTION as on delete behaviour. This obviously doesn't work for most of our tables, but there is not way to change this except by dropping and reapplying these FK constraints manually.
Currently I have implemented the following:
cascadeusers -> profiles
cascadeprofiles -> event_registrations
cascadeevents -> event_registrations
set nullstorage.objects (header_images) -> events
We will have to do the following:
cascadeprofiles -> votes
cascadeprofiles -> event_user_pairs
cascadeevent_user_pairs -> votes
What should happen when the organizer of an event deletes their account? Do we just set the organizer null and cancel the event? Do we delete the event and try notifying the users? If we do not delete the event, do we delete parts that may include sensitive information about the organizer like the description?
Note that some tables' rows cannot be deleted by users at this point, but we should probably already start thinking about the expected behaviour, because it will making testing easier.
The text was updated successfully, but these errors were encountered:
I think we should add a button that enables the organizer to delete their event - then there wouldn't be a difference between cancelling and deleting the event.
After the deletion of an event the users just get notified that their event got cancelled and the mail contains the events title, description, address so they remember what it was.
After an event host deletes their account, all their thrown events get deleted aswell (but from the participants perspective the events were "cancelled")
By default Supabase, foreign keys have either RESTRICT or NO ACTION as on delete behaviour. This obviously doesn't work for most of our tables, but there is not way to change this except by dropping and reapplying these FK constraints manually.
Currently I have implemented the following:
users -> profiles
profiles -> event_registrations
events -> event_registrations
storage.objects (header_images) -> events
We will have to do the following:
profiles -> votes
profiles -> event_user_pairs
event_user_pairs -> votes
What should happen when the organizer of an event deletes their account? Do we just set the organizer null and cancel the event? Do we delete the event and try notifying the users? If we do not delete the event, do we delete parts that may include sensitive information about the organizer like the description?
Note that some tables' rows cannot be deleted by users at this point, but we should probably already start thinking about the expected behaviour, because it will making testing easier.
The text was updated successfully, but these errors were encountered: