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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 7 16:32:54 CEST 2022


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 at lists.koha-community.org
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list