0
Error : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'

I reinstall the setup with a fresh database and it did not solve the issue. Please suggest a solution for this.

After reinstalling magento2 setup: a new error occured : Notice: Undefined offset: 8 in /opt/lampp/htdocs/namuk/NAMU/branches/namuk2.2.5/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php

  • Migrate in which Magento? – Dhaduk Mitesh Jun 28 '18 at 11:13
  • from 1.9.2.4 to 2.2.5 – Divya Muralidharan Jun 28 '18 at 12:41
  • Can you check 1-Migration_Default this value exists in eav_attribute_set table? – Dhaduk Mitesh Jun 28 '18 at 12:45
0

Try to use the latest version of the tool It has fixes which may help.

0

Go to table eav_attribute_group and see if there are multiple entries for 1-Migration_Defaul in attribute_group_code column of the table. Delete any one row or try running migration command without -r|--reset arguments like this - php bin/magento bin/magento migrate:data {<path to config.xml>}

  • there is no multiple entries – Divya Muralidharan Jun 28 '18 at 12:41
  • In which database are you checking? Check in destination database. – mighty_hk Jun 28 '18 at 12:43
  • Yes in the destination database @mighty_hk – Divya Muralidharan Jun 28 '18 at 13:05
  • Then try running command without -r argument like this - php bin/magento bin/magento migrate:data {<path to config.xml>} – mighty_hk Jun 29 '18 at 4:46
0

I think I know what happens, it's one I have banged my head against in the past

It happens that if an error stops the migration then the migration of the attribute sets does not get reverted, and several tables get left in a state that will break the next migration attempt. So the next time you will get undefined offset, then duplicate entry, then undefined offset, then duplicate entry

  • m2's eav_attribute_set table ends up containing the "migration_" entries after the undefined offset error or any other error during a further substep of the eav process (hence causing the "duplicate" error next time)

  • m2's eav_attribute_set table ends up completely empty after this error (causing the "undefined offset" error next time as the default entries are missing)

  • on and on forever

Note that you first have to have another error, like missing document. Ideally you keep a snapshot of the eav_attribute... tables and reset them.

For those struggling, I have managed to pass through by MANUALLY (in SQL) rebuilding the eav_attribute_set and eav_attribute_group tables in the database to have only the original entries, but with the IDs from after my first migration

But if I then get another error in the EAV step (eg: class name reference from a module I am not planning to migrate) then this error is back on the next run so I have to do that manual clean up over and over.

See my second comment on this issue on the migration tool bug tracker for details of the SQL https://github.com/magento/data-migration-tool/issues/204 to

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.