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?

Rakesh Donga
  • 5,344
  • 2
  • 24
  • 57
Crim
  • 131
  • 1
  • 10

1 Answers1

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 :)

Prathap Gunasekaran
  • 3,269
  • 1
  • 16
  • 37