CDbCommand error

Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘25961885’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote_item` (`quote_id`, `no_discount`, `weight`, `qty`, `price`, `base_price`, `discount_percent`, `discount_amount`, `base_discount_amount`, `tax_percent`, `tax_amount`, `base_tax_amount`, `row_total`, `base_row_total`, `row_total_with_discount`, `row_weight`, `free_shipping`, `item_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `additional_data`, `is_qty_decimal`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_applied_amount`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`) 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, :yp24, :yp25, :yp26, :yp27, :yp28, :yp29, :yp30, :yp31, :yp32, :yp33, :yp34, :yp35, :yp36, :yp37, :yp38, :yp39)

  1. Profile photo of Mag MMag M 790.00 $tone September 10, 2019
    And how duplicates can come when we are migrating first time ?

1 answer

Profile photo of Mall Staff 184060.00 $tone September 10, 2019
Public

Hi there,

And how duplicates can come when we are migrating first time ?

It come when you or your partner has added some items to cart in front end of your site.

constraint violation: 1062 Duplicate entry ‘25961885’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote_item` (`quote_id`, `no_discount`, `weight`, `qty`, `price`,

To continue, you could run below SQL in your M2 database to clean the duplicated record in table ‘quote_item':

Delete From quote_item Where item_id = 25961885;

+ Once done, continue data migration in step #7:
php -f bin/ubdatamigration run --step=7;
Regards,
Mall.
 
 
 

#1

Please login or Register to Submit Answer

Written By

Comments