[Bug 35611] New: Never use "ON UPDATE SET NULL"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 Bug ID: 35611 Summary: Never use "ON UPDATE SET NULL" Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl, martin.renvoize@ptfs-europe.com, nick@bywatersolutions.com, tomascohen@gmail.com Why are we using "ON UPDATE SET NULL" in kohastructure.sql exactly? IMO it should be replaced with "ON UPDATE CASCADE", everywhere. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- That does indeed seem strange to me... is it something around pseudoanonymisation perhaps? Generally, I think I'd expect to set 'ON UPDATE CASCADE ON DELETE SET NULL' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- What are the cases where we would change ids though? These all seem to reference rows that are auto increment, or cannot be edited (itemtype) If you are changing one of these, is it the same object? Should the links between tables remain? I am fine either way, but I don't think it should be happening very often -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #0)
Why are we using "ON UPDATE SET NULL" in kohastructure.sql exactly? IMO it should be replaced with "ON UPDATE CASCADE", everywhere.
Not so sure about that. You might loose much more than you want to. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35611 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #3)
(In reply to Jonathan Druart from comment #0)
Why are we using "ON UPDATE SET NULL" in kohastructure.sql exactly? IMO it should be replaced with "ON UPDATE CASCADE", everywhere.
Not so sure about that. You might loose much more than you want to.
Hmm. Thats DELETE for sure ;) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org