[Koha-bugs] [Bug 30490] Adjust foreign key for parent item type

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 2 09:13:12 CEST 2022


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

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #139678|0                           |1
        is obsolete|                            |

--- Comment #9 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 140072
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140072&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>

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

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


More information about the Koha-bugs mailing list