CDbCommand failed to execute the SQL statement

Hi Mall,
 
While executing Step 5 ( UB  Data Migration Pro v3.1.5)  for data migration we are getting following error
 
“CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ’16’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `catalog_product_entity_media_gallery` (`attribute_id`, `media_type`, `disabled`, `value_id`, `value`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4)”
Can you please help.
Thanks
Goekhan

1 answer

Profile photo of Mall Staff 184060.00 $tone October 5, 2018
Public

Hi there,

Duplicate entry ’16’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `catalog_product_entity_media_gallery` (`attribute_id`, `media_type`, `disabled`, `value_id`, 

That seem you have sample data in M2 instance and you have checked to ‘KEEP ORIGINAL IDs’ checkbox in settings of step #5.
To solve that issue and continue data migration in the step #5, you must delete the record of sample data. You could use below SQL statement to delete that record:

Delete From catalog_product_entity_media_gallery Where value_id = 16;

Once done, you could continue data migration in step #5 of our migration tool.
Regards,
Mall.
 

#

Please login or Register to Submit Answer

Written By

Comments