startSetup(); /** * Create table 'sitemap' */ $table = $installer->getConnection() ->newTable($installer->getTable('sitemap/sitemap')) ->addColumn('sitemap_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( 'identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true, ), 'Sitemap Id') ->addColumn('sitemap_type', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array( ), 'Sitemap Type') ->addColumn('sitemap_filename', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array( ), 'Sitemap Filename') ->addColumn('sitemap_path', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array( ), 'Sitemap Path') ->addColumn('sitemap_time', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array( 'nullable' => true, ), 'Sitemap Time') ->addColumn('store_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( 'unsigned' => true, 'nullable' => false, 'default' => '0', ), 'Store id') ->addIndex($installer->getIdxName('sitemap/sitemap', array('store_id')), array('store_id')) ->addForeignKey($installer->getFkName('sitemap/sitemap', 'store_id', 'core/store', 'store_id'), 'store_id', $installer->getTable('core/store'), 'store_id', Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) ->setComment('Google Sitemap'); $installer->getConnection()->createTable($table); $installer->endSetup();