Skip to content
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

FK_CATALOG_COMPARE_ITEM_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID constraint fails #208

Closed
gputignano opened this issue Dec 21, 2016 · 2 comments
Labels

Comments

@gputignano
Copy link

gputignano commented Dec 21, 2016

When I try to migrate data from magento v1.9.3.1 to magento v2.1.3 usind Migration Tool v2.1.3 I get this error message:
[0;31m[2016-12-21 16:00:31][ERROR]: Foreign key (FK_CATALOG_COMPARE_ITEM_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID) constraint fails. Orphan records id: 0 from catalog_compare_item.customer_idhas no referenced records incustomer_entity�[0m

This depends on a missing record in customer_entity table. The missing record, i think is for guest visitor with customer_id=0.

If I add this record with customer_id=0 it works. How can I solve without add manually this record?

@victor-v-rad
Copy link
Collaborator

you can

  • remove this step from your config.xml
  • remove record in catalog_compare_item

@gputignano
Copy link
Author

I resolved adding a new record with customer_id set to 0 in customer_entity table.
Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants