I want to add one more column into an existing table, this is my attempt:
My upgrade-1.0.0-1.1.0.php
:
$installer = $this;
$installer->startSetup();
$installer->getConnection();
$installer->getTable('paketid_booking/result');
->addColumn(
'vendor_airway_bill',
Varien_Db_Ddl_Table::TYPE_TEXT, 255,
array(),
'Vendor Airway Bill'
)
$installer->endSetup();
Set version :
<modules>
<PaketId_Booking>
<!-- The version of our module, starting at 1.0.0 -->
<version>1.1.0</version>
</PaketId_Booking>
</modules>
<default>
<paketid_booking>
<api>
<email>test@paket.id</email>
<key>TEST-API-KEY</key>
<debug>0</debug>
</api>
</paketid_booking>
</default>
<global>
<blocks>
<paketid_booking>
<class>PaketId_Booking_Block</class>
</paketid_booking>
</blocks>
<helpers>
<paketid_booking>
<class>PaketId_Booking_Helper</class>
</paketid_booking>
</helpers>
My config.xml
:
<models>
<paketid_booking>
<class>PaketId_Booking_Model</class>
<resourceModel>paketid_booking_resource</resourceModel>
</paketid_booking>
<paketid_booking_resource>
<class>PaketId_Booking_Model_Resource</class>
<entities>
<result>
<table>paketid_booking_result</table>
</result>
</entities>
</paketid_booking_resource>
</models>
<resources>
<paketid_booking_setup>
<setup>
<module>PaketId_Booking</module>
</setup>
</paketid_booking_setup>
</resources>
<events>
<checkout_type_onepage_save_order_after>
<paketid_booking>
<type>singleton</type>
<class>PaketId_Booking_Model_Observer</class>
<method>processOrder</method>
</paketid_booking>
</observers>
</checkout_type_onepage_save_order_after>
</events>
</global>
<adminhtml>
<layout>
<updates>
<paketid_booking>
<file>paketid_booking.xml</file>
</paketid_booking>
</updates>
</layout>
<events>
<core_block_abstract_to_html_after>
<observers>
<paketid_booking>
<type>singleton</type>
<class>PaketId_Booking_Model_Adminhtml_Observer</class>
<method>getSalesOrderBookingInfo</method>
</paketid_booking>
</observers>
</core_block_abstract_to_html_after>
</events>
</adminhtml>
My sql setup folder :
What did I do wrong?
install-1.0.0.php
and now i want to upgrade it to add one column on that table. I edited my question adding the rest ofconfig.xml
@YiorgosMoschovitis – may Sep 14 '16 at 3:29