Use UTC as the default timezone value for all users.

This commit is contained in:
Alex Tselegidis 2020-03-29 14:02:00 +02:00
parent 19406ca2c0
commit db5c2968c6

View file

@ -11,27 +11,17 @@
* @since v1.4.0 * @since v1.4.0
* ---------------------------------------------------------------------------- */ * ---------------------------------------------------------------------------- */
class Migration_Add_add_timezone_columns extends CI_Migration { class Migration_Add_timezone_columns extends CI_Migration {
public function up() public function up()
{ {
$this->db->query('
ALTER TABLE `ea_appointments`
ADD `timezone` VARCHAR(256) NULL AFTER `end_datetime`;
');
$this->db->query(' $this->db->query('
ALTER TABLE `ea_users` ALTER TABLE `ea_users`
ADD `timezone` VARCHAR(256) NULL AFTER `notes`; ADD `timezone` VARCHAR(256) DEFAULT "UTC" AFTER `notes`;
'); ');
} }
public function down() public function down()
{ {
$this->db->query('
ALTER TABLE `ea_appointments`
DROP COLUMN `timezone`;
');
$this->db->query(' $this->db->query('
ALTER TABLE `ea_users` ALTER TABLE `ea_users`
DROP COLUMN `timezone`; DROP COLUMN `timezone`;