]> git.koha-community.org Git - koha.git/commit
Bug 30899: Correct dbrev 211200041
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 7 Jun 2022 14:11:23 +0000 (14:11 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Jun 2022 14:04:57 +0000 (11:04 -0300)
commit129e353685f0e0a7552a03c771924012d7890c6b
tree102a1a951fe7a09f143e00e5a01ccd1f280b6085
parentd9e8a0e9d23a62e64a1b67e96e0dd2de9613e2ab
Bug 30899: Correct dbrev 211200041

Replace DROP CONSTRAINT by DROP FOREIGN KEY.

Note: It seems that we do not need a new dbrev for master. A developer
could follow test plan below to correct if really needed.

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] cp installer/data/mysql/db_revs/211200041.pl installer/data/mysql/atomicupdate/
[2] run updatedatabase; check show create table
[3] 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
[4] 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
[5] rm installer/data/atomicupdate/211200041.pl

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/db_revs/211200041.pl