Integrity constraint violation: 1062 Duplicate entry ‘4-Images’ for key – Magento 2
Integrity constraint violation: 1062 Duplicate entry ‘4-Images’ for key ‘EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME’, query was: UPDATE `eav_attribute_group` SET `attribute_group_name` = ? WHERE (`attribute_group_id`=10)
This particular error presented itself while upgrading from Magento 2.0.2 to Magento 2.1.x and stops the upgrade process. We’ve discovered the issue is related to old data from the previous Magento 1.9.x installation. In order to over come this error, you’ll need to delete a row from the database.
Run the following MySQL query to find and delete the offending attribute.
After that then you can attempt to run the upgrade command again and the issue should be resolved.
We understand not everyone can be a MySQL / Magento 2 expert so if you’re faced with a similar issue and stuck between an upgrade feel free to contact us to assist with your problem.