Bug 27313 - bulkmarcimport.pl -d foreign key constraint fails when entries in issues exist
Summary: bulkmarcimport.pl -d foreign key constraint fails when entries in issues exist
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: 20.11
Hardware: All Linux
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-29 12:56 UTC by davewood
Modified: 2020-12-29 13:15 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davewood 2020-12-29 12:56:25 UTC
11:41 < cait1> hm can you file a bug report please?
11:41 < cait1> we have tightened some things in the db, this might be a side effect
11:41 < cait1> but basically... you have issues
11:41 < cait1> Ausleihen
11:41 < cait1> so it's correct in failing
11:41 < cait1> if you truncate the issues first this is probably going to work better
11:42 < cait1> the script is not supposed to be used once you have loaded other transactional data atm
11:42 < cait1> for the same data...


perl /usr/share/koha/bin/migration_tools/bulkmarcimport.pl -d -m=*MARCXML* -file test.marc.xml
deleting biblios                 
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_libelle`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) [for Statement "DELETE FROM biblio"] at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 174.
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_libelle`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) [for Statement "DELETE FROM biblioitems"] at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 176.
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_libelle`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) [for Statement "DELETE FROM items"] at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 178.
.DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1588, <GEN24> line 2.