-- Deploy gaia:api_2016_08_02_create_table_youngdoctorvote to mysql

BEGIN;

CREATE TABLE `api_youngdoctorvote` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `case_id` integer NOT NULL,
    `vote_num` integer NOT NULL,
    `real_vote` integer NOT NULL,
    `last_modify_time` datetime(6) NOT NULL
 );

ALTER TABLE `api_youngdoctorvote` ADD CONSTRAINT `case_id_refs_id_499287d0` FOREIGN KEY (`case_id`) REFERENCES `api_youngdoctorcase` (`id`);
COMMIT;
