From 52e17063b72b9e32d570ef0df3e7eca26194b413 Mon Sep 17 00:00:00 2001 From: alext Date: Sat, 8 Jun 2019 16:57:09 +0200 Subject: [PATCH] Added location field for services. --- src/application/migrations/013_location.php | 12 +++++++++++- src/assets/sql/structure.sql | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/application/migrations/013_location.php b/src/application/migrations/013_location.php index 270bba7d..74cfabc1 100644 --- a/src/application/migrations/013_location.php +++ b/src/application/migrations/013_location.php @@ -18,13 +18,23 @@ class Migration_location extends CI_Migration { ALTER TABLE `ea_appointments` ADD COLUMN `location` TEXT AFTER `end_datetime`; '); + + $this->db->query(' + ALTER TABLE `ea_services` + ADD COLUMN `location` TEXT AFTER `description`; + '); } public function down() { $this->db->query(' ALTER TABLE `ea_appointments` - DROP COLUMN `location` TEXT AFTER `end_datetime`; + DROP COLUMN `location`; + '); + + $this->db->query(' + ALTER TABLE `ea_services` + DROP COLUMN `location`; '); } } diff --git a/src/assets/sql/structure.sql b/src/assets/sql/structure.sql index b481a72b..e8d2d8b4 100644 --- a/src/assets/sql/structure.sql +++ b/src/assets/sql/structure.sql @@ -78,6 +78,7 @@ CREATE TABLE IF NOT EXISTS `ea_services` ( `price` DECIMAL(10, 2), `currency` VARCHAR(32), `description` TEXT, + `location` TEXT, `availabilities_type` VARCHAR(32) DEFAULT 'flexible', `attendants_number` INT(11) DEFAULT '1', `id_service_categories` INT(11),