-- Deploy gaia:api_2019_09_21_create_table_storeclassificationrelevance to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_servicestoreclassificationrelevance` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `service_id` integer NOT NULL,
    `storeclassification_id` integer NOT NULL,
    `doctor_id` varchar(100) NOT NULL,
    `rank` integer NOT NULL
);
ALTER TABLE `api_servicestoreclassificationrelevance` ADD CONSTRAINT `doctor_id_refs_id_41d2936d` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);
ALTER TABLE `api_servicestoreclassificationrelevance` ADD CONSTRAINT `storeclassification_id_refs_id_7ee7acef` FOREIGN KEY (`storeclassification_id`) REFERENCES `api_storeclassification` (`id`);
ALTER TABLE `api_servicestoreclassificationrelevance` ADD CONSTRAINT `service_id_refs_id_28e74f11` FOREIGN KEY (`service_id`) REFERENCES `api_service` (`id`);
COMMIT;
