-- Deploy gaia:hippo_20190909_quich_reply to mysql

BEGIN;

CREATE TABLE `hippo_quickreplygroup` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `doctor_id` varchar(100) NOT NULL,
    `name` varchar(100) NOT NULL,
    `rank` integer NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `modify_time` datetime(6) NOT NULL
);
ALTER TABLE `hippo_quickreplygroup` ADD CONSTRAINT `doctor_id_refs_id_3ceb2aeb` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);
CREATE TABLE `hippo_quickreplycontent` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `quickreplygroup_id` integer NOT NULL,
    `name` varchar(300) NOT NULL,
    `rank` integer NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `modify_time` datetime(6) NOT NULL
);
ALTER TABLE `hippo_quickreplycontent` ADD CONSTRAINT `quickreplygroup_id_refs_id_8d601016` FOREIGN KEY (`quickreplygroup_id`) REFERENCES `hippo_quickreplygroup` (`id`);

COMMIT;
