Added location field in the database for appointments.

This commit is contained in:
alext 2019-06-08 15:56:38 +02:00
parent cd58d5d07d
commit 31673436fe
4 changed files with 33 additions and 2 deletions

View file

@ -37,7 +37,7 @@ $config['migration_table'] = 'ea_migrations';
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 12; // current
$config['migration_version'] = 13; // current
/*

View file

@ -0,0 +1,30 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/* ----------------------------------------------------------------------------
* Easy!Appointments - Open Source Web Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
* @link http://easyappointments.org
* @since v1.4.0
* ---------------------------------------------------------------------------- */
class Migration_location extends CI_Migration {
public function up()
{
$this->db->query('
ALTER TABLE `ea_appointments`
ADD COLUMN `location` TEXT AFTER `end_datetime`;
');
}
public function down()
{
$this->db->query('
ALTER TABLE `ea_appointments`
DROP COLUMN `location` TEXT AFTER `end_datetime`;
');
}
}

View file

@ -24,4 +24,4 @@ VALUES
('display_privacy_policy', '0'),
('privacy_policy_content', 'Privacy policy content.');
INSERT INTO `ea_migrations` VALUES ('12');
INSERT INTO `ea_migrations` VALUES ('13');

View file

@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS `ea_appointments` (
`book_datetime` DATETIME,
`start_datetime` DATETIME,
`end_datetime` DATETIME,
`location` TEXT,
`notes` TEXT,
`hash` TEXT,
`is_unavailable` TINYINT(4) DEFAULT '0',