Nice to meet you in Magento blog! When you install Magento Community 1.6.x.x and above or Magento Enterprise 1.10.x.x and above, sometimes you meet the error “Invalid default value for period” as follows:

Error in file:

“/hsphere/local/home/d********/******.co.uk/store/app/code/core/Mage/SalesRule/sql/
salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php” – SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for ‘period’

It makes you unable to continue to install. How can you deal with this issue?

I have encountered this problem previously and found out an effective solution to fix it. You can access your database management and use the following paragraph of SQL code:

ALTER TABLE 'coupon_aggregated' CHANGE COLUMN 'period' 'period' DATE NOT NULL DEFAULT '0000-00-00'

Hope that it can help you when installing Magento on your site. Drop your comment below if you have any questions or sharing. Nice code 🙂

You can read other articles on Magento framework in our Magento blog!

Related Tutorials

[yellowbox] Exclusive information: Nearly 50% of consumers have been unable to execute an online transaction due to forgetting their password (Ponemon Institute). How to get away from this fact? Now, Magento Social Login can help. Go here! [/yellowbox]
Author

Why Magestore? We believe in building a meaningful & long-term relationship with you.

Write A Comment