I am using this data-migration-tool,
When i migrate from magento 1.9.3.2 to magento 2.3,getting below error,
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID'
i tried many times upload fresh DB,still getting this issue
Best Answer
The error occurs if there are orders in the Magento 1 database with no
increment_id
set. You can check if you have such orders by running the following SQL statement in your Magento 1 database:If the returned value is greater than 0, you should update the tables
sales_flat_order
andsales_flat_order_grid
in such a way to ensure that all your orders have increment_ids and those are unique.If you find
incrment_ids
in thesales_flat_order_grid
table for all orders, just take the values from there with the following statemen:If you don't find orders without any increment_id it might be the best option to create arbitrary increment_ids. For example you can use a SQL update statement which builds an
increment_id
based on theentity_id
and a prefix of your choice (just replace the prefix in the sample statements with something which doesn't conflict with existing increment_ids):