-- Deploy gaia:api_2016_07_21_create_table_agreement_doctor to mysql

BEGIN;

CREATE TABLE `api_agreement_doctor` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `agreement_id` integer NOT NULL,
    `doctor_id` varchar(100) NOT NULL,
    `create_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_agreement_doctor` ADD CONSTRAINT `doctor_id_refs_id_f051c4d6` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);
ALTER TABLE `api_agreement_doctor` ADD CONSTRAINT `agreement_id_refs_id_e6264731` FOREIGN KEY (`agreement_id`) REFERENCES `api_agreement` (`id`);

COMMIT;
