cancel
Showing results for 
Search instead for 
Did you mean: 

mysql error on upload ALTER TABLE `salesrule_customer_group`

mysql error on upload ALTER TABLE `salesrule_customer_group`

Hi

I recently had to upload an older mysql file fro my website.

I got this error

Error

SQL query:

ALTER TABLE `salesrule_customer_group`
ADD CONSTRAINT `FK_SALESRULE_CSTR_GROUP_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `FK_SALESRULE_CUSTOMER_GROUP_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE

MySQL said: Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`timports_magento`.`#sql-310_23`, CONSTRAINT `FK_SALESRULE_CUSTOMER_GROUP_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASC)

 

I'm not a professional of Magento and especially with MySQL.

 

Since the error customer and myself (the owner) are not receiving email confirmation. Im not sure if this is related or not.

 

Please can someone help.