When i’m trying to run “migrate products” I have this error : ” CDbCommand failed to execute the SQL statement: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘low_stock_date’ at row 1 ”
What can I do for using it ?
2 answers
Hi there,
Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘low_stock_date’ at row 1
That because your product data section has some bad data in the value of the field named `low_stock_date`. To solve that, let do steps as bellow:
-- Open the php file at path: pub/ub-tool/protected/controllers/Step5Controller.php
and find to the code line:
$stockItem2->product_id = $entityId2;
and replace it by code lines:
$stockItem2->product_id = $entityId2;
if ($stockItem2->low_stock_date === '0000-00-00 00:00:00' || empty($stockItem2->low_stock_date)) {
$stockItem2->low_stock_date = date("Y-m-d H:i:s");
}
-- Once done, you can continue with data migration in the step #5 by cli command:
php -f bin/ubdatamigration run --step=5
Regards,
Mall.
Perfect thanks.
This question is now closed