Skip to content

Magento 2 Data Migration “Integrity constraint violation: 1062 Duplicate entry ### for key ‘SALES_CREDITMEMO_INCREMENT_ID_STORE_ID

I’ve been having issues while using the data migration tool to migrate data from Magento 1.9.3 to Magento 2.3:

I already setup the config.xml to migrate only Customers and Sales. I then run the following commands:

php bin/magento migrate:settings –reset vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.8/config.xml

php bin/magento migrate:data –auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.8/config.xml

and then get the following error:

In Mysql.php line 182:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘100000003-1’ for key ‘SALES_CREDITMEMO_INCREMENT_ID_STORE_ID’

The Magento 2 database sales_creditmemo_* tables are all empty, so I’m clueless.
Any help is greatly appreciated.