[Koha-bugs] [Bug 22642] New: DB upgrade 18.06.00.005 can fail
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 4 16:40:21 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22642
Bug ID: 22642
Summary: DB upgrade 18.06.00.005 can fail
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Database
Assignee: koha-bugs at lists.koha-community.org
Reporter: fridolin.somers at biblibre.com
QA Contact: testopia at bugs.koha-community.org
Target Milestone: ---
DB upgrade 18.06.00.005 from Bug 12395 can fail :
BD::mysql::db do failed: Cannot add or update a child row: a foreign key
constraint fails (`koha`.`aqorders`, CONSTRAINT `aqorders_created_by` FOREIGN
KEY (`created_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL
ON UPDATE CASCADE) [for Statement "UPDATE aqorders, aqbasket SET
aqorders.created_by = aqbasket.authorisedby WHERE aqorders.basketno =
aqbasket.basketno AND aqorders.created_by IS NULL;"] at
./installer/data/mysql/updatedatabase.pl line 16131.
This upgrade adds a constraint on aqorders.created_by linked to
borrowers.borrowernumber.
Then copies aqbasket.authorisedby into aqorders.created_by.
But aqbasket.authorisedby as no constraint so its value may not be an existing
borrowernumber (deleted borrower).
--
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