Added location field for services.

This commit is contained in:
alext 2019-06-08 16:57:09 +02:00
parent dfd55d9472
commit 52e17063b7
2 changed files with 12 additions and 1 deletions

View file

@ -18,13 +18,23 @@ class Migration_location extends CI_Migration {
ALTER TABLE `ea_appointments` ALTER TABLE `ea_appointments`
ADD COLUMN `location` TEXT AFTER `end_datetime`; ADD COLUMN `location` TEXT AFTER `end_datetime`;
'); ');
$this->db->query('
ALTER TABLE `ea_services`
ADD COLUMN `location` TEXT AFTER `description`;
');
} }
public function down() public function down()
{ {
$this->db->query(' $this->db->query('
ALTER TABLE `ea_appointments` ALTER TABLE `ea_appointments`
DROP COLUMN `location` TEXT AFTER `end_datetime`; DROP COLUMN `location`;
');
$this->db->query('
ALTER TABLE `ea_services`
DROP COLUMN `location`;
'); ');
} }
} }

View file

@ -78,6 +78,7 @@ CREATE TABLE IF NOT EXISTS `ea_services` (
`price` DECIMAL(10, 2), `price` DECIMAL(10, 2),
`currency` VARCHAR(32), `currency` VARCHAR(32),
`description` TEXT, `description` TEXT,
`location` TEXT,
`availabilities_type` VARCHAR(32) DEFAULT 'flexible', `availabilities_type` VARCHAR(32) DEFAULT 'flexible',
`attendants_number` INT(11) DEFAULT '1', `attendants_number` INT(11) DEFAULT '1',
`id_service_categories` INT(11), `id_service_categories` INT(11),