Thursday, 5 April 2012

Magento 1.6.2.0 Syntax error or access violation: 1067 Invalid default value for ‘period‘

When I am trying to install magento 1.6.2.0 I getting error in 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'. after long time I finding solution for that. Just fire below query in your database and continue setup just remove error link from url. I hope it work for you.
ALTER TABLE `coupon_aggregated` CHANGE COLUMN `period` `period` DATE NOT NULL DEFAULT ‘0000-00-00’ 

3 comments:

  1. found it working, thanks for sharing

    ReplyDelete
  2. You can extend Magento store to next level by optimizing the mobile mass market and increase your revenue potential. Mobile commerce has been growing quickly, and there is significant demand for merchants who want to mobilize their business. Magento Website Design

    ReplyDelete