New Zenner
- Join Date:
- Jan 2008
- Posts:
- 9
- Plugin Contributions:
- 0
#1216 - Cannot add or update a child row: a foreign key constraint fails
I was importing a backup made with phpmyadmin (latest version of zen cart)
It works but... it gave me 1 error message on 2 alters:
#1216 - Cannot add or update a child row: a foreign key constraint fails
It did not want to do the following 2 alters:
ALTER TABLE eav_entity_attribute ADD CONSTRAINT FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE FOREIGN KEY ( attribute_id ) REFERENCES eav_attribute ( attribute_id ) ONDELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT FK_EAV_ENTITY_ATTRIBUTE_GROUP FOREIGN KEY ( attribute_group_id ) REFERENCES eav_attribute_group ( attribute_group_id ) ON DELETE CASCADEON UPDATE CASCADE ;
I know that a while ago I changed the 2 creation statements of the table to add the constraints on that place.
Does anybody has seen this before?