I'm trying to run the targetrule indexer in my terminal and it shows some syntax error
Command:
php indexer.php --reindex targetrule
Error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint (`giftease`.`enterprise_targetrule_index_crosssell_product`, CONSTRAINT `FK_94AAB744E142C77E39E72506AB13F090` FOREIGN KEY (`targetrule_id`) REFERENCES `giftease`.`enterprise_targetrule_index_cr)' in /var/www/html/giftease-upgrade/lib/Zend/Db/Statement/Pdo.php:243
I've tried this:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE enterprise_targetrule_index_crosssell_product;
SET FOREIGN_KEY_CHECKS=1;
With no success