<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

/**
 * Upgrade MODULE module to version TO_VERSION
 *
 * @author CIEXT skeleton
 */
class MODULE_upgrade_FILE_VERSION extends \Ciext\Migration\AbstractUpgrade
{

    public function up()
    {
        if (!$this->is_column_exist('TABLE_NAME', 'COLUMN_NAME')) {
            $ci = &get_instance();
//            $ci->db->query('ALTER TABLE `TABLE_NAME` ADD `COLUMN_NAME` text CHARACTER SET utf8;');
//            $ci->db->query('ALTER TABLE `TABLE_NAME` MODIFY `COLUMN_NAME` VARCHAR(255);');
        }
        
        return 'TO_VERSION';
    }
    
    public function down()
    {
        return 'FROM_VERSION';
    }

}
