]> git.koha-community.org Git - koha.git/commit
Bug 30449: Add missing FK constraint on borrower_attribute_types
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 4 Apr 2022 13:20:37 +0000 (13:20 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 6 May 2022 17:56:29 +0000 (13:56 -0400)
commitceb65c12baaf4e5ac86e433c3b19e0c1742cb9c2
tree7c6b4966af4d4740fae14736bf7938163546c9c2
parent126c70c982089c74c75d1c99d33c01c9cc4cf001
Bug 30449: Add missing FK constraint on borrower_attribute_types

Old Koha databases probably have it, newer ones might not.
See also BZ description.

Test plan:
[1} Check SHOW CREATE TABLE borrower_attribute_types to see if you
    have any index and FK constraint on category_code.
[2] Run updatedatabase.
[3] If you had category_code_fk, it should be replaced.
[4] Remove index and constraint again using things like:
    alter table borrower_attribute_types drop constraint `borrower_attribute_types_ibfk_1`;
    alter table borrower_attribute_types drop index category_code;
[5] Run updatedatabase.
[6] You should have KEY category_code and FK borrower_attribute_types_ibfk_1.
[7] Run updatedatabase. Idempotent, no changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug_30449.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql