I am trying to migrate a store from to Magento 2.2 using the Magento data migration tool but unfortunately when running the tool the error appears

[PDOException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'default' for key 'STORE_GROUP_CODE'

As I understand

STORE_GROUP_CODE is a new column added in Magento 2.2 It is generated from column STORE_GROUP_NAME which in Magento 2.X is found in table STORE_GROUP

In Magento column STORE_GROUP_NAME is located with table CORE_STORE_GROUP

from within the Magento database

enter image description here

so migration is failing because of the duplicate entries.

The default Value for website_id 0 (admin) should be 'default' The default value for website id 1 (base) should be 'Main Website Store'

Unfortunately, both my store_group_names are the default.

As an experiment I change Store_Group_Name for website 1 (base) to 'Main Website Store' and data migration ran no problems.

Everything worked until I reindex the result was

Frontend: When viewing the store (on a clean luma 2.2 installations) the add to cart buttons are missing Backend: All products show in list view but if you click one product it loads with the error: Unable to unserialize value

Does anyone know how I can change the Store_Group_Name website id 1 (base) without breaking the database

2 Answers 2


Magento 2 has new field 'code' in store_group table and it is automatically created from magento 1 store name.So it seems you have a duplicate store name in magento 1

First try to make the store name unique in magento 1 from system > Manage stores and then run migration setting command.


solution was just to change store name in magento admin of then export

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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