2020-04-22 22:48:56 +03:00
|
|
|
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
2020-03-29 13:47:57 +03:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.4.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Class Migration_Add_timezone_columns
|
|
|
|
*
|
|
|
|
* @property CI_Loader load
|
|
|
|
* @property CI_DB_query_builder db
|
|
|
|
* @property CI_DB_forge dbforge
|
|
|
|
* @property Settings_Model settings_model
|
|
|
|
*/
|
2020-03-29 15:02:00 +03:00
|
|
|
class Migration_Add_timezone_columns extends CI_Migration {
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Upgrade method.
|
|
|
|
*/
|
2020-03-29 13:47:57 +03:00
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
$this->db->query('
|
|
|
|
ALTER TABLE `ea_users`
|
2020-03-29 15:02:00 +03:00
|
|
|
ADD `timezone` VARCHAR(256) DEFAULT "UTC" AFTER `notes`;
|
2020-03-29 13:47:57 +03:00
|
|
|
');
|
|
|
|
}
|
|
|
|
|
2020-04-22 22:48:56 +03:00
|
|
|
/**
|
|
|
|
* Downgrade method.
|
|
|
|
*/
|
2020-03-29 13:47:57 +03:00
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
$this->db->query('
|
|
|
|
ALTER TABLE `ea_users`
|
|
|
|
DROP COLUMN `timezone`;
|
|
|
|
');
|
|
|
|
}
|
|
|
|
}
|