Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

There has been an error processing your request
Jr. Member
Total Posts:  1
Joined:  2012-12-31

I’m getting following error while installing magento:

Error in file: “C:\xampp\htdocs\magento\app\code\core\Mage\SalesRule\sql\salesrule_setup\upgrade-” - SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for ‘period’

#0 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘’, ‘’)
#2 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’’, ‘’)
#3 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 C:\xampp\htdocs\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#7 C:\xampp\htdocs\magento\index.php(87): Mage::run(’’, ‘store’)
#8 {main}

Can anyone please help me out on this?. Thank You

Magento Community Magento Community
Magento Community
Magento Community
Template fans
Total Posts:  446
Joined:  2009-11-02

Try to replace in the file magento\app\code\core\Mage\SalesRule\sql\salesrule_setup\install-
lines 333-335:

-> addColumn (’period’, Varien_Db_Ddl_Table :: TYPE_DATE, null, array (
‘nullable’ => false,
), ‘Period’)


-> addColumn (’period’, Varien_Db_Ddl_Table :: TYPE_DATE, null, array (
‘nullable’ => true,
), ‘Period’)

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top