install-0.0.1.php
2.1 KB
<?php
/**
* @copyright (c) 2014, netz.coop eG
*/
/**
* @var Mage_Sales_Model_Mysql4_Setup $installer
*/
$installer = $this;
$installer->startSetup();
$tableName = $installer->getTable('anc_playlist/ncplaylist');
if ($installer->getConnection()->isTableExists($tableName) != true ){
$table = $installer->getConnection()->newTable($tableName)
->addColumn('entity_id', Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('identity' => true,'unsigned' => true,'nullable' => false,'primary' => true,),'Id')
->addColumn('customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('unsigned' => true,'nullable' => false,'default' => '0',),'Customer ID')
->addColumn('ncalbum_id', Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('unsigned' => true,'nullable' => false,'default' => '0',),'ncalbum id')
->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('unsigned' => true,'nullable' => false,'default' => '0',),'Order Id')
->addColumn('quote_item_id',Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('unsigned' => true,'nullable' => false,'default' => '0',),'Quote Item Id')
->addColumn('urlauth', Varien_Db_Ddl_Table::TYPE_VARCHAR,null,array(),'spezial eindeutiger url teil')
->addColumn('ordertime', Varien_Db_Ddl_Table::TYPE_TIMESTAMP,null,array(),'Bestellzeitpunkt')
// redudant
->addColumn('product_name', Varien_Db_Ddl_Table::TYPE_VARCHAR,null,array(),'redudant: Produktname')
->addColumn('customer_name', Varien_Db_Ddl_Table::TYPE_VARCHAR,null,array(),'redudant: Kundenname')
->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP,null,array(),'When beginn')
->addColumn('updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP,null,array(),'When updated')
->addColumn('deleted_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP,null, array(), 'When deleted')
->addColumn('deleted', Varien_Db_Ddl_Table::TYPE_TINYINT,null,array('default' => '0'),'Deleted')
->addColumn('track_num', Varien_Db_Ddl_Table::TYPE_INTEGER,null,array('unsigned' => true,'nullable' => false,'default' => '0',),'Aufrufe')
;
$installer->getConnection()->createTable($table);
}
$installer->endSetup();
?>