After Upgrate Magento 2 from version 2.2.5 to 2.3.4 Integrity constraint violation: 1452 Cannot add or update a child row
-
14-04-2021 - |
Pergunta
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
, CONSTRAINTCAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID
FOREIGN KEY (entity_id
) REFERENCEScatalog_product_entity
(entity_id
) ON DELETE CASCADE), query was: ALTER TABLEcatalog_product_entity_decimal
MODIFY COLUMNvalue
decimal(20, 6) NULL COMMENT "Value", ADD CONSTRAINTCAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID
FOREIGN KEY (attribute_id
) REFERENCESeav_attribute
(attribute_id
) ON DELETE CASCADE, ADD CONSTRAINTCAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID
FOREIGN KEY (entity_id
) REFERENCEScatalog_product_entity
(entity_id
) ON DELETE CASCADE, ADD CONSTRAINTCATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID
FOREIGN KEY (store_id
) REFERENCESstore
(store_id
) ON DELETE CASCADE
Nenhuma solução correta