]> git.koha-community.org Git - koha.git/commit
Bug 30899: [22.05.x] Follow-up for dbrev 211200041 from bug 30449
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 7 Jun 2022 14:31:39 +0000 (14:31 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 24 Jun 2022 15:59:43 +0000 (15:59 +0000)
commit7192efd2717e1127f693491bf59e20c64566b53e
treecb0fb19a943cae82e4c61975f88d6ed2fb081536
parent90bbdfdd4faa834f4f027df202ab5acadb544150
Bug 30899: [22.05.x] Follow-up for dbrev 211200041 from bug 30449

Replace DROP CONSTRAINT by DROP FOREIGN KEY in old dbrev, and
submit a new dbrev to fix cases where dbrev went wrong.

Test plan:

NOTE: When you check show create table, verify that you see an index for category_code and a foreign key called borrower_attribute_types_ibfk_1.

[1] run updatedatabase; check show create table
[2] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; alter table borrower_attribute_types drop index category_code; RUN updatedatabase again; check show create table
[3] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; ALTER TABLE borrower_attribute_types ADD CONSTRAINT category_code_fk FOREIGN KEY (category_code) REFERENCES categories(categorycode); RUN updatedatabase again; check show create table
installer/data/mysql/atomicupdate/bug_30899.pl [new file with mode: 0755]
installer/data/mysql/db_revs/211200041.pl