-- Deploy gaia:2019_08_30_create_api_speciallbutton_doctor_rangetype to mysql

BEGIN;

CREATE TABLE `api_specialseckillbutton_doctors` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `specialseckillbutton_id` integer NOT NULL,
    `doctor_id` varchar(255) NOT NULL
)
;

ALTER TABLE `api_specialseckillbutton_doctors` ADD CONSTRAINT `specialseckillbutton_id_refs_id_wfd16cae` FOREIGN KEY (`specialseckillbutton_id`) REFERENCES `api_specialseckillbutton` (`id`);
ALTER TABLE `api_specialseckillbutton_doctors` ADD CONSTRAINT `doctor_id_refs_id_a6b3780e` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);

ALTER TABLE `api_specialseckillbutton` ADD COLUMN `range_type` int(11) DEFAULT 0;

COMMIT;
