[Koha-bugs] [Bug 30490] Should deleting a parent itemtype be CASCADING?

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 23 15:25:33 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30490

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 139678
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139678&action=edit
Bug 30490: Adjust constraint itemtypes.itemtypes_ibfk_1

Change from CASCADE to restrict.
In harmony with dbrev 20.06.00.022.

Test plan:
Run the dbrev.
Bonus:
update itemtypes set parent_type='VM' where itemtype='CF';
delete from itemtypes where itemtype='VM';
=> ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key
constraint fails (`koha_myclone`.`itemtypes`, CONSTRAINT `itemtypes_ibfk_1`
FOREIGN KEY (`parent_type`) REFERENCES `itemtypes` (`itemtype`))

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list