]> git.koha-community.org Git - koha.git/commit
Bug 30490: Adjust constraint itemtypes.itemtypes_ibfk_1
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 23 Aug 2022 13:00:17 +0000 (13:00 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 22 Sep 2022 11:30:36 +0000 (08:30 -0300)
commit9b018fc6de35a51a1eaeae6868db050630ccc484
tree6cc280631c351277eb23fff40a3c2a356334c401
parentca338bae1e751228a1107237574b8f335c12b7bb
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@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_30490.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql