-- Deploy gaia:2017_09_18_add_special_service_dbmw to mysql

BEGIN;

    CREATE TABLE `api_specialservice_dbmw` (
        `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
        `special_id` integer NOT NULL,
        `service_id` integer NOT NULL
    )
    ;
    ALTER TABLE `api_specialservice_dbmw` ADD CONSTRAINT `special_id_refs_id_f271ad6d` FOREIGN KEY (`special_id`) REFERENCES `api_special` (`id`);
    ALTER TABLE `api_specialservice_dbmw` ADD CONSTRAINT `service_id_refs_id_adc4a2d5` FOREIGN KEY (`service_id`) REFERENCES `api_service` (`id`);

    CREATE INDEX `api_specialservice_dbmw_57902095` ON `api_specialservice_dbmw` (`special_id`);
    CREATE INDEX `api_specialservice_dbmw_91a0ac17` ON `api_specialservice_dbmw` (`service_id`);

COMMIT;
