Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.2
-
Fix Version/s: None
-
Component/s: Technical infrastructure
-
Labels:None
Description
When trying to rebuild the CiviCRM tables for the latest version:
sql $ mysql civicspace_082 -uxxxx -pyyyyy < civicrm_41.mysql
Enter password:
ERROR 1217 (23000) at line 71: Cannot delete or update a parent row: a foreign key constraint fails
I got round this by manually deleting the tables.
Next problem: When civicrm_sample.mysql is run:
sql $ mysql civicspace_082 -uroot -p < civicrm_sample.mysql
Enter password:
ERROR 1216 (23000) at line 3: Cannot add or update a child row: a foreign key constraint fails
This is fixed by adding:
SET FOREIGN_KEY_CHECKS = 0;
at the top of civicrm_sample.mysql, and at the bottom:
SET FOREIGN_KEY_CHECKS = 1;
(Running MySql 4.1.11 on Mandriva 10.2)