-- ----------------------------
-- Table structure for sys_log_longtext
-- ----------------------------
DROP TABLE IF EXISTS `sys_log_longtext`;
CREATE TABLE `sys_log_longtext`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sys_id` bigint NULL DEFAULT NULL,
  `params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '请求参数',
  `result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '结果',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_log_mediumtext
-- ----------------------------
DROP TABLE IF EXISTS `sys_log_mediumtext`;
CREATE TABLE `sys_log_mediumtext`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sys_id` bigint NULL DEFAULT NULL,
  `params` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '请求参数',
  `result` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '结果',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `sys_id`(`sys_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_log_text
-- ----------------------------
DROP TABLE IF EXISTS `sys_log_text`;
CREATE TABLE `sys_log_text`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sys_id` bigint NULL DEFAULT NULL,
  `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '请求参数',
  `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '结果',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `sys_id`(`sys_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- TEACHER_OPEN_COURSE_HOMEWORK_SETTING 字段调整
-- ----------------------------
-- 删除作业ID
ALTER TABLE teacher_open_course_homework_setting DROP teacher_open_course_question_homework_id;
-- 其他属性增加表名前缀
ALTER TABLE teacher_open_course_homework_setting CHANGE do_count teacher_open_course_question_homework_setting_do_count INT(5);
ALTER TABLE teacher_open_course_homework_setting CHANGE question_no_order teacher_open_course_question_homework_setting_question_no_order INT(5);
ALTER TABLE teacher_open_course_homework_setting CHANGE option_no_order teacher_open_course_question_homework_setting_option_no_order INT(5);
ALTER TABLE teacher_open_course_homework_setting CHANGE end_show_qa teacher_open_course_question_homework_setting_end_show_qa INT(5);
ALTER TABLE teacher_open_course_homework_setting CHANGE create_time teacher_open_course_question_homework_setting_add_time DATETIME;
-- 增加字段注释
ALTER TABLE teacher_open_course_homework_setting MODIFY COLUMN teacher_open_course_question_homework_setting_do_count INT(5) COMMENT '作答次数';
ALTER TABLE teacher_open_course_homework_setting MODIFY COLUMN teacher_open_course_question_homework_setting_question_no_order INT(5) COMMENT '题目乱序（同一大题内）';
ALTER TABLE teacher_open_course_homework_setting MODIFY COLUMN teacher_open_course_question_homework_setting_option_no_order INT(5) COMMENT '选项乱序（限单选、多选）';
ALTER TABLE teacher_open_course_homework_setting MODIFY COLUMN teacher_open_course_question_homework_setting_end_show_qa INT(5) COMMENT '答卷后显示答案解析';
ALTER TABLE teacher_open_course_homework_setting MODIFY COLUMN teacher_open_course_question_homework_setting_add_time INT(5) cOMMENT '创建时间';
