-- Deploy gaia:2020_02_08_doctor_card_generate to mysql

BEGIN;
CREATE TABLE `api_doctor_card` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `doctor_id` varchar(100) NOT NULL,
    `card_url` varchar(255) NOT NULL,
    `gen_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_doctor_card` ADD CONSTRAINT `doctor_id_refs_id_8b43c6ce` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);
CREATE INDEX `api_doctor_card_72821be1` ON `api_doctor_card` (`doctor_id`);

COMMIT;
