data-migration-tool
data-migration-tool copied to clipboard
Fix for 'Integrity constraint violation: 1062 Duplicate entry '11-general' for key'
Description
Resolves the way custom groups are migrated from Magento 1 to Magento 2.
Does away with the previous method of trying to find the default, non-product group logic which attempted to use the initialData to see what were the defaults.
The problem was that it did not take into account the remapping of entity types and attribute sets and so was looking up Magento 1 groups on Magento 2 by attributeSetId which would have been changed.
This leads to it bugging and thinking some default groups need to be added as "custom groups" but this clashes with previous migration work that already remapped groups.
Fixed Issues (if relevant)
- https://github.com/magento/data-migration-tool/issues/869
- https://github.com/magento/data-migration-tool/issues/928
- https://github.com/magento/data-migration-tool/issues/920
Manual testing scenarios
- Try migrate Magento 1 data that contains the "General" attribute group associated with an attribute set for the entity types [11 , 16 , 23, 19]
Contribution checklist
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] README.md file is updated and included in the pull request if any README.md predefined sections require an update