startSetup(); $table = $installer->getConnection() ->newTable($installer->getTable('sendfriend/sendfriend')) ->addColumn('log_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( 'identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true, ), 'Log ID') ->addColumn('ip', Varien_Db_Ddl_Table::TYPE_BIGINT, '20', array( 'unsigned' => true, 'nullable' => false, 'default' => '0', ), 'Customer IP address') ->addColumn('time', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( 'unsigned' => true, 'nullable' => false, 'default' => '0', ), 'Log time') ->addColumn('website_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( 'unsigned' => true, 'nullable' => false, 'default' => '0', ), 'Website ID') ->addIndex($installer->getIdxName('sendfriend/sendfriend', 'ip'), 'ip') ->addIndex($installer->getIdxName('sendfriend/sendfriend', 'time'), 'time') ->setComment('Send to friend function log storage table'); $installer->getConnection()->createTable($table); $installer->endSetup();