-
Notifications
You must be signed in to change notification settings - Fork 196
Integrity constraint violation: 1452 Cannot add or update a child row #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @Shane1812 |
Hi,thank you for your help,I think it is because the database ignores the SET FOREIGN_KEY_CHECKS=0,the server database is MariaDB,I think the tool set foreign key checks disable dont work on MariaDB,and I am not sure how to make it works... |
@victor-v-rad hi,I think it should not happen because I can see the data exsit in eav_attribute table.it should can find all the attribute _id at the table.I am so confused. |
Did you see #455 error at the beginning of migration? |
@victor-v-rad yes,it is not that error,I run the command without -a,and it shows no error.now I try to migrate the data from live database to my computer,and it's still stucked in this step even SET GLOBAL FOREIGN_KEY_CHECKS=0;I got stucked at 'catalog_product_entity_media_gallery_value' in this error too and after I clear some data from my M1 database it migrated smoothly,but in this table I dont know what need to clear because I can find all attribute_id(catalog_product_entity_varchar) in eav_attribute table. |
So was it fixed? |
@victor-v-rad no at this table,I met this error before but not this table but in 'catalog_product_entity_media_gallery_value',that after I clear the data it now can find the data from M2 database means the table migrate successfully.but catalog_product_entity_varchar this table still get stucked. |
Maybe catalog_product_entity_varchar has records with empty attribute_id |
@victor-v-rad I can find all attribute_id(catalog_product_entity_varchar) in eav_attribute table.that's why I am so confused. |
@victor-v-rad I copy the live server database to local server and migrate smooth...then delta it with server database,get this warning: |
migrate data from magento 1.9.2.4 to magento2.26
Steps to reproduce
process of migration.Please help
[2018-12-18 12:17:42][INFO][mode: data][stage: data migration][step: Map Step]: started
12% [===>------------------------] Remaining Time: 1 hr
[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fai
ls (
dbname
.catalog_product_entity_varchar
, CONSTRAINTCAT_PRD_ENTT_VCHR_ATTR_ID_EAV_ATTR_A TTR_ID
FOREIGN KEY (attribute_id
) REFERENCESeav_attribute
(attribute_id
))The text was updated successfully, but these errors were encountered: