<?php

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

/**
 * Upgrade Site_menu module to version 1.0.0
 *
 * @author CIEXT skeleton
 */
class Site_menu_upgrade_0 extends \Ciext\Migration\AbstractUpgrade
{

    public function up()
    {
        if ($this->is_column_exist('site_menu', 'view_order')) {
            $ci = &get_instance();
            $ci->db->query('ALTER TABLE `site_menu` MODIFY `view_order` int(11) NOT NULL DEFAULT \'0\';');
        }
        
        return '1.0.0';
    }
    
    public function down()
    {
        return '0';
    }

}
