Created
August 12, 2013 22:40
-
-
Save amacgregor/6216016 to your computer and use it in GitHub Desktop.
Creates the Registry Type tabke
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create Registry Type Table | |
*/ | |
$tableName = $installer->getTable('mdg_giftregistry/type'); | |
// Check if the table already exists | |
if ($installer->getConnection()->isTableExists($tableName) != true) { | |
$table = $installer->getConnection() | |
->newTable($installer->getTable('mdg_giftregistry/type')) | |
->addColumn('type_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( | |
'identity' => true, | |
'unsigned' => true, | |
'nullable' => false, | |
'primary' => true, | |
), 'Type Id') | |
->addColumn('code', Varien_Db_Ddl_Table::TYPE_TEXT, 25, array( | |
'nullable' => true, | |
), 'Code') | |
->addColumn('name', Varien_Db_Ddl_Table::TYPE_TEXT, 250, array( | |
'nullable' => true, | |
), 'name') | |
->addColumn('description', Varien_Db_Ddl_Table::TYPE_TEXT, 250, array( | |
'nullable' => true, | |
), 'Description') | |
->addColumn('store_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, | |
array( | |
'unsigned' => true, | |
'nullable' => false, | |
'default' => '0', | |
), | |
'Store Id') | |
->addColumn('is_active', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( | |
'unsigned' => true, | |
'nullable' => false, | |
'default' => '1', | |
), 'Is Active') | |
->setComment('Magento Developers Guide Type Table'); | |
$installer->getConnection()->createTable($table); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment