error step 5

Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ’60-1′ for key ‘CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID’. The SQL statement executed was: INSERT INTO `cataloginventory_stock_item` (`product_id`, `stock_id`, `min_qty`, `use_config_min_qty`, `is_qty_decimal`, `backorders`, `use_config_backorders`, `min_sale_qty`, `use_config_min_sale_qty`, `max_sale_qty`, `use_config_max_sale_qty`, `is_in_stock`, `use_config_notify_stock_qty`, `manage_stock`, `use_config_manage_stock`, `stock_status_changed_auto`, `use_config_qty_increments`, `qty_increments`, `use_config_enable_qty_inc`, `enable_qty_increments`, `is_decimal_divided`, `website_id`, `qty`, `low_stock_date`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20, :yp21, :yp22, :yp23)

2 answers

Profile photo of Mall Staff 184060.00 $tone May 27, 2019
Public

Hi there,

 1062 Duplicate entry ’60-1′ for key ‘CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID’. The SQL statement executed was: INSERT INTO `cataloginventory_stock_item` (`product_id`, `stock_id`, `min_qty`, 

It seems you checked the ‘KEEP ORIGINAL IDs’ settings in Step #5 of our migration tool while your site had product data in M2 before using our migration tool.

To continue with the Keep Original Ids option, you need to delete such sample product data. You can run the below SQL query in your M2 database:

DELETE FROM cataloginventory_stock_item WHERE product_id = 60 AND stock_id = 1;

Then you can continue with the data migration in sStep #5 by running the CLI command:
php -f bin/ubdatamigration run --step=5;

Regards,
Mall.

#1
Profile photo of iticsoftware 10.00 $tone May 27, 2019
Public

ok. thenks…. work
but new problem
 
Processing in step #6…..[Processing] Step #6 migration completed with 1 Customer Groups;
Processing in step #6…
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `customer_entity` (`group_id`, `store_id`, `is_active`, `disable_auto_group_change`, `failures_num`, `entity_id`, `website_id`, `email`, `created_at`, `updated_at`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9)

#2

Please login or Register to Submit Answer

Written By

Comments