2014-01-04 19:35:20 +02:00
|
|
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
2015-07-20 22:41:24 +03:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
2015-10-07 22:36:59 +03:00
|
|
|
*
|
2015-07-20 22:41:24 +03:00
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2018-03-27 10:23:09 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
|
2015-10-07 22:36:59 +03:00
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
2015-07-20 22:41:24 +03:00
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.0.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
2014-01-04 19:35:20 +02:00
|
|
|
class Migration_Specific_calendar_sync extends CI_Migration {
|
|
|
|
|
2017-09-15 14:36:37 +03:00
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
if ( ! $this->db->field_exists('google_calendar', 'ea_user_settings'))
|
|
|
|
{
|
|
|
|
$fields = [
|
|
|
|
'google_calendar' => [
|
2015-10-07 22:36:59 +03:00
|
|
|
'type' => 'VARCHAR',
|
|
|
|
'constraint' => '128',
|
|
|
|
'null' => TRUE
|
2017-09-15 14:36:37 +03:00
|
|
|
]
|
|
|
|
];
|
2015-10-07 22:36:59 +03:00
|
|
|
$this->dbforge->add_column('ea_user_settings', $fields);
|
|
|
|
}
|
2017-09-15 14:36:37 +03:00
|
|
|
}
|
2014-01-04 19:35:20 +02:00
|
|
|
|
2017-09-15 14:36:37 +03:00
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
if ($this->db->field_exists('google_calendar', 'ea_user_settings'))
|
|
|
|
{
|
|
|
|
$this->dbforge->drop_column('ea_user_settings', 'google_calendar');
|
2015-10-07 22:36:59 +03:00
|
|
|
}
|
2017-09-15 14:36:37 +03:00
|
|
|
}
|
2015-10-07 22:36:59 +03:00
|
|
|
}
|