-- Deploy gaia:api_2016_12_20_alter_table_api_advertisemanagement to mysql

BEGIN;

ALTER TABLE `api_advertisemanagement`
ADD COLUMN `doctor_id` varchar(100),
ADD COLUMN `search_words` longtext,
ADD COLUMN `adver_type` varchar(8) NOT NULL DEFAULT '0',
ADD COLUMN `ordering` integer,
MODIFY COLUMN `service_id` integer,
MODIFY COLUMN `show_days` integer;

ALTER TABLE `api_advertisemanagement` ADD CONSTRAINT `doctor_id_refs_id_429a0ae2` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);

COMMIT;
