[Koha-bugs] [Bug 23813] New: DB error on upgrade from 18.12 to 19.05.04
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Oct 15 17:53:24 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23813
Bug ID: 23813
Summary: DB error on upgrade from 18.12 to 19.05.04
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Installation and upgrade (command-line installer)
Assignee: koha-bugs at lists.koha-community.org
Reporter: magnus at libriotech.no
QA Contact: testopia at bugs.koha-community.org
I just copied the DB from a gitified install running 18.1200014 to a standard
Debian install of 19.05.04. When I ran "sudo koha-upgrade-schema <instance> I
got this error:
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_3` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes`
(`itemtype`) 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_3` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes`
(`itemtype`) 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)
I have not looked further into this yet, just thought I'd report it sooner
rather than later.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list