<?php

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

/**
 * Upgrade module to version 3.2.0
 *
 * @author Roman Ratsun
 */
class resmng_upgrade_1_0_12 extends Abstract_upgrade
{

    public function up()
    {
        $ci = & get_instance();
        $ci->db->where('name', 'folder')->update('resource_type', ['alias' => 'Folder']);
        $ci->db->where('name', 'page_template')->update('resource_type', ['alias' => 'Page template']);
        $ci->db->where('name', 'page')->update('resource_type', ['alias' => 'Page']);
        $ci->db->where('name', 'resource')->update('resource_type', ['alias' => 'Resource']);

        return '3.2.0';
    }

    public function down()
    {
        return '1.0.12';
    }

}
