<?php

class m130304_165815_add_ext_code_for_adi_in_storicotable extends MyDbMigration
{
	public function up()
	{
		if ($this->dbConnection->schema->getTable('storicotable')->getColumn('ext_code') == null)
    		$this->addColumn('storicotable', 'ext_code', 'string');
		
		
	try {	
    	$this->createIndex('index_order_ext_code', 'storicotable', 'ext_code', true);
	} catch (Exception $e) {		}
	
	}
	

	public function down()
	{
    $this->dropIndex('index_order_ext_code', 'storicotable');
    $this->dropColumn('storicotable', 'ext_code');
	}

}
