<?php

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

/**
 * Upgrade Inlineeditor module to version 3.3.0
 *
 * @author CIEXT skeleton
 */
class Inlineeditor_upgrade_0 extends \Ciext\Migration\AbstractUpgrade
{

    public function up()
    {
        if (!$this->is_table_exist('inlineeditor_text')) {
            $ci = &get_instance();
            $ci->db->query(file_get_contents(dirname(__DIR__, 2) . '/data/upgrade_0.sql'));
        }
        
        return '3.3.0';
    }
    
    public function down()
    {
        if ($this->is_table_exist('inlineeditor_text')) {
            $ci = &get_instance();
            $ci->db->query('DROP TABLE `inlineeditor_text`');
        }

        return '0';
    }

}
