I am reporting for OC V4.1.0.3.
When activating product discount the UI will accept no values to be filled in the date field.
strangely the record will be saved with a 0000-00-00 value, instead of null, which is not a valid one.
Therefore during a db restore an error will be thrown and the restore will be stopped as the
value of 0000-00-00 will be refused as a valid data of one of these two tables :
- oc_product_discount
- oc_product_special
of 0000-00-00 by null or any valid date.
As usual as a basic safety do not work with your original backup !
Code: Select all
# sample code to replace 0 based date
sed -i "s/'0000-00-00' /NULL /g" copy_of_backup.sql