we're facing integrity constraint violation errors while importing products (and the corresponding categories) with category_flat setting activated.
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`XXXXXXXXX`.`catalog_category_flat_store_1`, CONSTRAINT `FK_CAT_CTGR_FLAT_STORE_1_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`)
Is there a way to programmatically disable category flat tables before importing products? After the import proccess the indexes are getting refreshed.
Thanks!