Hi,
It seems that you've got in issuingrules table an itemtype that
does not exists in itemtypes table, so the constraint on
circulation_rules raises an error when trying to insert it.
SELECT itemtype FROM issuningrules LEFT JOIN itemtypes USING (itemtype) WHERE itemtypes.itemtype IS NULL and issuingrules.itemtype !='*'
should give you the faulty records.
Best regards
S. Meynieux
-- Hi, Responsable support BibLibre + 33 (0)4 91 81 35 08 http://www.biblibre.com
Hello all,
Simple question: am I interpreting right that '*' itemtypes in issuingrules fail to migrate to circulation_rules because of the constraint?
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_vingt`.`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) , 'finedays', COALESCE( finedays, '' )
FROM issuingrules
"] at ./installer/data/mysql/updatedatabase.pl line 20712.
Migrating that DB can be long, so rather than re-test extensively, I figured I'd raise my hand and ask the community what I'm getting wrong. Migration goes from 19.05.04 to 20.05.04.
Thanks in advance,
--
Philippe Blouin,
Directeur de la technologie
Tél. : (833) 465-4276, poste 230
philippe.blouin@inLibro.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/