-- Deploy gaia:api_2016_05_13_create_api_docprojecttag to mysql

BEGIN;

CREATE TABLE `api_docprojecttag` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `doctor_id` varchar(100) NOT NULL,
    `tag_id` integer NOT NULL,
    `tag_content` longtext
)
;
ALTER TABLE `api_docprojecttag` ADD CONSTRAINT `tag_id_refs_id_a61ea157` FOREIGN KEY (`tag_id`) REFERENCES `api_tag` (`id`);
ALTER TABLE `api_docprojecttag` ADD CONSTRAINT `doctor_id_refs_id_8d3b8880` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);

ALTER TABLE `api_diary` ADD COLUMN `is_choice` TINYINT(1) NOT NULL DEFAULT FALSE;
ALTER TABLE `api_diary` ADD COLUMN `is_choice_content` longtext NOT NULL;


COMMIT;
