/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
try {
$installer->getConnection()
->addColumn($installer->getTable('blog/blog'), 'thumbnail', array(
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
'nullable' => false,
'length' => 255,
'after' => null, // column name to insert new column after
'comment' => 'Title'
));
} catch (Exception $e) {
Mage::logException($e);
}
$installer->endSetup();
Created
March 17, 2017 07:45
-
-
Save evgv/99a14a69dc5391e9f5e58f6fc8ca0d4f to your computer and use it in GitHub Desktop.
Magento. Add new column to existed table
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment