ayon-backend
ayon-backend copied to clipboard
Events: Allow cascade delete
Story
Currently it is tricky to delete events if they have children events. Constrain for depends_on column does not have ON DELETE CASCADE
set.
After a year of experience with the event stream, pros of having a fast and simple way of deleting event including children outweigh most of the concerns. Manual check for children always can be performed in the case this behavior is undesired.
Proposed solution
Add ON DELETE CASCADE
to events.depends_on foreign key constraint