[Koha-bugs] [Bug 23813] DB error on 18.12.00.020

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 22 14:27:13 CEST 2019


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

--- Comment #5 from Magnus Enger <magnus at libriotech.no> ---
I tried to copy over the db again, cleaned up some deleted itemtypes and tried
the upgrade. This time I got errors related to categorycodes:

$ sudo koha-upgrade-schema <instance>
Upgrading database schema for <instance>
...
Upgrade to 18.12.00.019 done (Bug 21728 - Add 'Reserve Fee' to the
account_offset_types table if missing)
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key
constraint fails (`koha_alingsas`.`circulation_rules`, CONSTRAINT
`circ_rules_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `categories`
(`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "
            INSERT INTO circulation_rules ( categorycode, branchcode, itemtype,
rule_name, rule_value )
            SELECT IF(categorycode='*', NULL, categorycode),
                   IF(branchcode='*', NULL, branchcode),
                   IF(itemtype='*', NULL, itemtype),
                   'maxissueqty',
                   COALESCE( maxissueqty, '' )
            FROM issuingrules
        "] at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl line
17545.
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key
constraint fails (`koha_alingsas`.`circulation_rules`, CONSTRAINT
`circ_rules_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `categories`
(`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "
            INSERT INTO circulation_rules ( categorycode, branchcode, itemtype,
rule_name, rule_value )
            SELECT IF(categorycode='*', NULL, categorycode),
                   IF(branchcode='*', NULL, branchcode),
                   IF(itemtype='*', NULL, itemtype),
                   'maxonsiteissueqty',
                   COALESCE( maxonsiteissueqty, '' )
            FROM issuingrules
        "] at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl line
17554.
Upgrade to 18.12.00.020 done (Bug 18925 - Move maxissueqty and
maxonsiteissueqty to circulation_rules)
...

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


More information about the Koha-bugs mailing list