After Upgrate Magento 2 from version 2.2.5 to 2.3.4 Integrity constraint violation: 1452 Cannot add or update a child row

magento.stackexchange https://magento.stackexchange.com/questions/321396

Question

I am trying to upgrade Magento 2 version from 2.2.5 to 2.3.4 using CLI. Version up-gradation is done. After version upgrade when I run bin/magento setup:upgrade it will give an error as follow:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (wheels_financing_live.#sql-4a3_9e8, CONSTRAINT CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (entity_id) REFERENCES catalog_product_entity (entity_id) ON DELETE CASCADE), query was: ALTER TABLE catalog_product_entity_decimal MODIFY COLUMN value decimal(20, 6) NULL COMMENT "Value", ADD CONSTRAINT CAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID FOREIGN KEY (attribute_id) REFERENCES eav_attribute (attribute_id) ON DELETE CASCADE, ADD CONSTRAINT CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (entity_id) REFERENCES catalog_product_entity (entity_id) ON DELETE CASCADE, ADD CONSTRAINT CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE CASCADE

Here wheels_financing_live is my DB name. magento

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top