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

--- Comment #5 from Magnus Enger <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to