https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30490 Bug ID: 30490 Summary: Should deleting a parent itemtype be CASCADING? Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Database Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org This is a sync issue between schema and upgrades. MASTER structure: CONSTRAINT `itemtypes_ibfk_1` FOREIGN KEY (`parent_type`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE $DBversion = '20.06.00.022'; ALTER TABLE itemtypes ADD CONSTRAINT itemtypes_ibfk_1 FOREIGN KEY (parent_type) REFERENCES itemtypes (itemtype) NOTE: When you do not add CASCADE, you fallback to RESTRICT ! Main question is now: Which is right? Should the delete be cascading or not? I would opt for RESTRICT here. A pragmatical choice too; deleting item types will normally not be done so much :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.