2

I'm getting the following error using the Magento 2 Migration Tool 2.3.0 during the Map Step:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0--0--0.0000-0.0000-0-' for key 'UNQ_D2BA9F275EE0D3F3C26A1EC39FD4924D'

I have searched on Google for this error but cannot find anything similar. How can I find where this is coming from?

1

Try this,

It happens for either one of these following reasons,

Reason 1 :

This will cause if you accidentally delete default attribute set in that case.

1.Truncate the following table eav_attribute_group,eav_attribute_set(Disable Foreign key constrain) 2.Insert the table

INSERT INTO eav_attribute_set (attribute_set_id, entity_type_id, attribute_set_name, sort_order) VALUES (1, 1, 'Default', 2),(2, 2, 'Default', 2),(3, 3, 'Default', 1),(4, 4, 'Default', 1),(5, 5, 'Default', 1),(6, 6,'Default', 1),(7, 7, 'Default', 1),(8, 8, 'Default', 1),(10, 10, 'Default', 1);

then

INSERT INTO eav_attribute_group (attribute_group_id, attribute_set_id, attribute_group_name, sort_order, default_id, attribute_group_code, tab_group_code) VALUES (1, 1, 'General', 1, 1, 'general', NULL),(4, 2, 'General', 1, 1, 'general', NULL),(7, 3, 'General', 10, 1, 'general', NULL),(10, 3, 'General Information', 2, 0,'general-information', NULL),(13, 3, 'Display Settings', 20, 0, 'display-settings', NULL),(16, 3, 'Custom Design', 30, 0, 'custom-design', NULL),(19, 4, 'Product Details', 10, 1, 'product-details', 'basic'),(22, 4, 'Advanced Pricing', 40, 0, 'advanced-pricing', 'advanced'),(25, 4, 'Search Engine Optimization', 30, 0, 'search-engine-optimization', 'basic'),(28, 4, 'Images', 20, 0, 'image-management', 'basic'),(31, 4, 'Design', 50, 0, 'design', 'advanced'),(34, 4, 'Autosettings', 60, 0, 'autosettings', 'advanced'),(37, 4, 'Content', 15, 0, 'content', 'basic'),(40, 4, 'Schedule Design Update',55, 0, 'schedule-design-update', 'advanced'),(43, 4, 'Bundle Items', 16, 0, 'bundle-items', NULL),(46, 5, 'General', 1, 1, 'general', NULL),(49, 6, 'General', 1, 1, 'general', NULL),(52, 7, 'General', 1, 1, 'general', NULL),(55, 8, 'General', 1, 1, 'general', NULL),(58, 4, 'Gift Options', 61, 0, 'gift-options', NULL),(61, 10, 'General', 1, 1, 'general', NULL);

Reason 2 :

It happens may be you have migrated data over existing data in it, please try migrate data with fresh database with each try. Even if the migration failed once you have to start migrate in fresh database.

EDIT :

Once the migration is failed then you have to fix and start migration from new database. Just follow below steps to make it easier.

  1. Install a fresh magento.
  2. Take a backup of fresh database then start migrate.
  3. Once failed fix it and import the backup database then start migrate again.

Hope this helps :)

  • but in magento 1 table all entry available – Rakesh Donga Mar 4 at 10:51
  • Either one of these reason cause problem in your case – Prathap Gunasekaran Mar 4 at 10:52
  • It seems duplicate entry happened so the migration failed there, try the above steps or start migration in new database. – Prathap Gunasekaran Mar 4 at 10:54
  • i have allready duplicate entry removed it and no need to new database installed it – Rakesh Donga Mar 4 at 10:55
  • If you truncated the complete table then there won't be any problem if issue still persist then it must be data is not been truncated. So gotta go with fresh migration. – Prathap Gunasekaran Mar 4 at 10:57

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.