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),