-- Deploy mimas-qa:qa_2018_04_25_add_bdxzh to mysql

BEGIN;

CREATE TABLE `bd_answer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `original_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `portrait` varchar(200) NOT NULL,
  `doctor_id` varchar(100) NOT NULL,
  `doctor_title` varchar(2) NOT NULL,
  `doctor_department` varchar(50) NOT NULL,
  `hospital_type` varchar(1) NOT NULL,
  `hospital_name` varchar(100) NOT NULL,
  `hospital_level` int(11) NOT NULL,
  `content` longtext NOT NULL,
  `is_recommend` tinyint(1) NOT NULL,
  `like_num` int(11) NOT NULL,
  `is_submit` tinyint(1) NOT NULL,
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `question_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bd_answer_7aa0f6ee` (`question_id`),
  CONSTRAINT `bd_answer_question_id_18fcd330_fk_question_id` FOREIGN KEY (`question_id`) REFERENCES `api_question` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

COMMIT;
