On My site, I am running an old version of Advanced Product Options Suite Extension for Magento 2 by mageworx. I just updated the Advanced Product Options Suite Extension into the latest version. I tried updating with upload Extension files manually also tried update Extension via composer also. In both cases, after I run bin/magento setup:upgrade command I am getting the below error.
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dqgdqtpdwx`.`#sql-73a8_365`, CONSTRAINT `MAGEWORX_OPTBASE_PRD_ATTRS_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE)
I tried to check on My Database but I can't found any table or data related to this error. Someone can help me to solve this issue?
Hi @sarunstoreaee8 ,
Check in the latest extension database file (db_schema.xml file).
If they use product_id in any table then mageworx table which use product_id column type must be same like same like catalog_product_entity table entity_id field.
if the column type doesn't match for the both then try to update the mageworx table column type and run setup:upgrade.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!