Magento 2.3 migration - Duplicate entry error after theme migration

Note: I did data migration couple of times, during data migration max_allowd_packet issue then update and again run the data migration.

How to solve the php bin/magento setup:upgrade error, If i try to run upgrade command i am getting following error,

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘21’ for key ‘PRIMARY’, query was: INSERT INTO eav_attribute_set ( entity_type_id , attribute_set_name , sort_order , attribute_set_id ) VALUES (?, ?, ?, ?)

Queries :

  1. SELECT * FROM eav_attribute_set WHERE attribute_set_id = ‘21’;
  2. SELECT * FROM eav_attribute_group WHERE attribute_set_id = ‘21’;

How to solve this error?

The way to get around this issue is to exclude database tables from the migration/restore process entirely.

Post edited by TechnoBear to remove self-promotion

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.