Status: fail in Step5

Hi,
I have a magento 2 store with data in the backend. I am using UB DMP to do a delta migration. 
I setup the tool and started the migration, in step5 I am getting the following error.
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘6026-1’ for key ‘CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID’
Please help me resolve this.
Thanks!

1 answer

Profile photo of Mall Staff 184060.00 $tone September 26, 2018
Public

Hi there,

Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘6026-1’ for key ‘CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID’

It seem you have selected ‘KEEP ORIGINAL IDs’ in step #5 of our migration tool and You have added more products in M2 back-end
after the first migration. Let’s try run below SQL in your M2 database to remove the duplicated record in table ‘cataloginventory_stock_item’

DELETE FROM cataloginventory_stock_item WHERE stock_id = '1' AND product_id = 6062;

+ Once done, continue with data migration in the step #5 by run below CLI command:
php -f bin/ubdatamigration run --step=5;
And tell me know how it goes.
Regards,
Mall.
 

#1

Please login or Register to Submit Answer

Written By

Comments