[Koha] foreign key constraint fails when importing csv

Marty ontariowolf64 at yahoo.com
Fri Jan 30 07:05:09 NZDT 2009


Me again.
Trying to get borrowers from old koha to koah 3 I get this error message;

mysql> LOAD DATA INFILE "/home/marty/patronz.csv" INTO TABLE borrowers FIELDS TERMINATED BY ',' ENCLOSED BY "";

ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`koha/borrowers`, CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`))

Not sure about this foreign key constraint, did I fail to set some value in Koha?


      


More information about the Koha mailing list