ALTER TABLE `whitelist_management`   
  ADD COLUMN `is_temporary` INT DEFAULT 0  NULL   COMMENT '是否临时性的(1:是 0:否)' AFTER `phone`,
  ADD COLUMN `start_time` DATE NULL   COMMENT '临时使用开始时间' AFTER `is_temporary`,
  ADD COLUMN `end_time` DATE NULL   COMMENT '临时使用结束时间' AFTER `start_time`;
  
ALTER TABLE `teaching_quality_evaluation`   
  CHANGE `course_code` `course_code` VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '课程编号',
  CHANGE `course_type` `course_type` VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '课程分类';

DROP TABLE IF EXISTS `wf_overtime_long`;
CREATE TABLE `wf_overtime_long`  (
  `id` BIGINT NOT NULL,
  `user_id` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '申请人',
  `overtime_department` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '加班部门',
  `overtime_start_time` DATETIME NULL DEFAULT NULL COMMENT '加班开始时间',
  `overtime_end_time` DATETIME NULL DEFAULT NULL COMMENT '加班结束时间',
  `overtime_template` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '加班明细模板',
  `supporting_materials` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '加班明细附件',
  `leader_in_charge` 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 COMMENT = '加班申请（长）' ROW_FORMAT = DYNAMIC; 


DROP TABLE IF EXISTS `student_report_record`;
CREATE TABLE `student_report_record`  (
  `id` BIGINT NOT NULL,
  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
  `user_id` BIGINT DEFAULT NULL COMMENT '学生id',
  `report_time` DATETIME DEFAULT NULL COMMENT '报到时间',
  `base_semester_id` BIGINT DEFAULT NULL COMMENT '所属学期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = INNODB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生报到记录表'; 


ALTER TABLE  `base_new_student`   
  ADD COLUMN `delete_reason` VARCHAR(300) NULL   COMMENT '删除原因(用于新生删除功能)' AFTER `second_ambition_id`;

ALTER TABLE `material_task_appendix`   
  CHANGE `material_task_id` `material_task_id` BIGINT NULL   COMMENT '材料提交任务分配(material_task_assign)';

ALTER TABLE `course_table`   
  CHANGE `create_date` `create_date` DATETIME NULL   COMMENT '创建时间',
  CHANGE `modify_date` `modify_date` DATETIME NULL   COMMENT '修改时间';


DROP TABLE IF EXISTS `base_class_dynamics`;
CREATE TABLE `base_class_dynamics`  (
  `id` BIGINT NOT NULL,
  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
  `class_id` BIGINT DEFAULT NULL COMMENT '班级id',
  `title` VARCHAR(200) DEFAULT NULL COMMENT '标题',
  `role_type` VARCHAR(50) DEFAULT NULL COMMENT '发送范围(学生、家长)',
  `content` VARCHAR(1000) DEFAULT NULL COMMENT '内容',
  `folder_id` BIGINT DEFAULT NULL COMMENT '附件',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = INNODB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '班级动态表'; 

-- 2024年9月5日
ALTER TABLE xjr_workflow_record ADD workflow_approve_type INT NOT NULL DEFAULT 4 COMMENT '工作流审批类型';

ALTER TABLE xjr_workflow_form_relation ADD current_state VARCHAR(50) COMMENT '当前状态 STATE_ACTIVE-正在运行的流程实例,STATE_SUSPENDED-挂起的流程实例,STATE_COMPLETED-通过正常结束事件完成,STATE_EXTERNALLY_TERMINATED-外部终止，例如通过REST API终止,STATEINTERNALY_TERMINATED-内部终止，例如通过终止边界事件';

ALTER TABLE xjr_workflow_form_relation ADD start_time DATETIME COMMENT '开始时间';

ALTER TABLE xjr_workflow_form_relation ADD end_time DATETIME COMMENT '结束时间';