2020-04-22 22:48:56 +03:00
|
|
|
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
2018-04-12 16:03:46 +03:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2020-03-11 12:10:59 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
2018-04-12 16:03:46 +03:00
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.2.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Class Migration_Add_user_extra_working_plan
|
|
|
|
*
|
|
|
|
* @property CI_Loader load
|
|
|
|
* @property CI_DB_query_builder db
|
|
|
|
* @property CI_DB_forge dbforge
|
|
|
|
* @property Settings_Model settings_model
|
|
|
|
*/
|
2018-04-12 16:03:46 +03:00
|
|
|
class Migration_Add_user_extra_working_plan extends CI_Migration {
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Upgrade method.
|
|
|
|
*/
|
2018-04-12 16:03:46 +03:00
|
|
|
public function up()
|
|
|
|
{
|
2020-04-22 22:48:56 +03:00
|
|
|
if ( ! $this->db->field_exists('extra_working_plan', 'ea_user_settings'))
|
|
|
|
{
|
2018-04-12 16:03:46 +03:00
|
|
|
$fields = [
|
|
|
|
'extra_working_plan' => [
|
|
|
|
'type' => 'TEXT',
|
|
|
|
'null' => TRUE,
|
|
|
|
'default' => '',
|
|
|
|
'after' => 'working_plan'
|
|
|
|
]
|
|
|
|
];
|
|
|
|
|
|
|
|
$this->dbforge->add_column('ea_user_settings', $fields);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Downgrade method.
|
|
|
|
*/
|
2018-04-12 16:03:46 +03:00
|
|
|
public function down()
|
|
|
|
{
|
2020-04-22 22:48:56 +03:00
|
|
|
if ( ! $this->db->field_exists('extra_working_plan', 'ea_user_settings'))
|
|
|
|
{
|
2018-04-12 16:03:46 +03:00
|
|
|
$this->dbforge->drop_column('ea_user_settings', 'extra_working_plan');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|