How do I restart product migration

I had an issue while migrating the database and it stop on step 5 Migrating Products. I have tried to reset and then run step 5 again however I get an error
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘default-W3-1-18\” x 18\”-Aluminum (.063\”)-ASTM Type I (E.G.)’ for key ‘INVENTORY_SOURCE_ITEM_SOURCE_CODE_SKU’. The SQL statement executed was: INSERT INTO `inventory_source_item` (`quantity`, `status`, `source_code`, `sku`) VALUES (:yp0, :yp1, :yp2, :yp3)
How do I resolve this so I can continue? Or should I just dump the database and start everything over? my Magento 2 database is a fresh install with nothing in it except what has been migrated.
 
Thank You for your help

1 answer

Profile photo of Mall Staff 115660.00 $tone August 9, 2019
Public

Hi there,

1062 Duplicate entry ‘default-W3-1-18\” x 18\”-Aluminum (.063\”)-ASTM Type I (E.G.)’ for key ‘INVENTORY_SOURCE_ITEM_SOURCE_CODE_SKU’.

Please try with steps below:
+ Reset data migration in the step #5  by running the command: 
php -f bin/ubdatamigration reset --step=5;
+ Then, run the following SQL in your M2 database:

Delete From inventory_source_item;

+ Once done, navigate back to Step 5 in our migration tool’s dashboard and start data migration in this step again.

Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments