Data Migration Eav Step Error When Migration from M1 to M2
Data Migration Eav Step Error When Migration from M1 to M2. In this article we will show the cause and how to fix this error.
SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'
This error occurs when the migration tool fails to transfer data (e.g. due to integrity violations) without rolling back and is ran again. It attempts to create "Migration_Default" attribute set and fails because it already is present in the database.
1) Restore your Magento 2.0 database from a copy that you (hopefully) made before running the migration tool.
2) Run the migration tool again and check for the first error that it fails on. In my case it was:
[PDOException] SQLSTATE: Integrity constraint violation: 1062 Duplicate entry 'home-1' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID'
3) Fix the problem (I had to manually remove a row in the DB).
Repeat the steps until you've cleared all errors and see the sweet-sounding message: