Today I forgot to set a comment for my new column which broke the complete module setup procedure. Here is one example how you can add a new column to the sales flat table ” sales_flat_order_item “.
1 2 3 4 5 6 7 8 |
<?php $installer = $this; $installer->startSetup(); $installer->getConnection()->addColumn($installer->getTable('sales/order_item'), 'custom_price_field', array('type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, 'length' => '12,4', 'comment' => 'My new custom price field')); $installer->endSetup(); ?> |