-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
videodb: add a delete trigger for the files table #6972
videodb: add a delete trigger for the files table #6972
Conversation
+1 Thanks. |
jenkins build and merge |
@Montellese do we need a database version bump? |
64730cd
to
1e89519
Compare
@xhaggi: Thanks for the reminder. Forgot to cherry-pick that one. |
jenkins build and merge |
Wouldn't ON DELETE CASCADE be more suitable? |
there is no cascading in MySQL MyISAM only InnoDB. if we force innodb then we could use it instead of delete trigger, but keep in mind we need foreign key constraints. |
First of all I'm not a fan of CASCADE because you loose absolute control over what is happening. Secondly (as already explained by @xhaggi) it's not supported everywhere and we don't have any explicit foreign key contraints etc. |
OSX build error is unrelated. Any objections? |
Fine by me |
videodb: add a delete trigger for the files table
This adds an SQL trigger for deletes on the
files
table so that we don't have to remember to clean up all those other tables that have a foreign key on thefiles
table. Right now there's only one place but there'll be others in the future (in some of my work) and since it doesn't hurt adding it already I thought I put up a PR.