I am new to Magento. I want to add a column in the newsletter_subscriber table so I made a new file mysql4-upgrade-1.6.0.0-1.6.0.1.php in app/code/core/mage/newsletter_setup/
<?php
$installer = $this;
$installer->startSetup();
$installer->getConnection()->addColumn(
$this->getTable('newsletter/subscriber'), //table name
'groupid', //column name
'varchar(100) NOT NULL' //datatype definition
);
$installer->endSetup();
?>
I updated the config file:
<modules>
<Mage_Newsletter>
<version>1.6.0.0</version>
</Mage_Newsletter>
</modules>
It doesn't work, please guide what I am doing wrong
It is not recommended to add/modify or do changes to any core files . Better you make a new module to add an extra column .
You have to mention correct version for module upgrade in
app/code/local/your/module/sql/your_module_setup/upgrade-0.1.2-0.1.3.phpfile. (This means your upgrade the module version from 0.1.2 to 0.1.3). If your are not using upgrade script, remember to define<resources>in moduleconfig.xmland the setup script name ismysql4-install-0.1.0.phpBelow is Mysql setup script file -
upgrade-0.1.2-0.1.3.phpand after that change app/code/local/your/module/etc/config.xml version for example