3.4.0.sql 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. USE teachcloud_db;
  2. ALTER TABLE `basic_operation_log`
  3. DROP COLUMN `user_name`,
  4. DROP COLUMN `return_value`,
  5. DROP COLUMN `run_time`,
  6. DROP COLUMN `method`,
  7. DROP COLUMN `clazz_name`,
  8. DROP COLUMN `system_type`,
  9. DROP COLUMN `operation_unit`,
  10. DROP COLUMN `operation_type`,
  11. DROP COLUMN `level`,
  12. DROP COLUMN `org_id`,
  13. ADD COLUMN `function_name` VARCHAR(100) NULL COMMENT '功能名称' AFTER `operation_type`,
  14. CHANGE COLUMN `user_id` `user_id` BIGINT NOT NULL COMMENT '用户对象id' AFTER `school_id`,
  15. CHANGE COLUMN `ip` `ip` VARCHAR(32) CHARACTER SET 'utf8mb4' NOT NULL COMMENT 'ip地址' AFTER `user_id`,
  16. CHANGE COLUMN `privilege_id` `privilege_id` BIGINT NULL DEFAULT NULL COMMENT '权限菜单id' AFTER `ip`,
  17. CHANGE COLUMN `customized_operation_type` `operation_type` VARCHAR(32) CHARACTER SET 'utf8mb4' NOT NULL COMMENT '自定义记录日志操作类型(LOGIN(\"用户登录\"),LOGOUT(\"用户登出\"),ADD(\"新增\"),DELETE(\"删除\"),UPDATE(\"修改\"),IMPORT(\"导入\"),EXPORT(\"导出\"),UN_KNOW(\"未知\"))' AFTER `privilege_id`,
  18. CHANGE COLUMN `school_id` `school_id` BIGINT NULL COMMENT '学校id' ,
  19. CHANGE COLUMN `detail` `detail` MEDIUMTEXT CHARACTER SET 'utf8mb4' NULL COMMENT '日志详情' ,
  20. DROP INDEX `operation_log_idx` ,
  21. ADD INDEX `operation_log_idx` USING BTREE (`school_id`, `user_id`, `privilege_id`, `operation_type`, `create_time`);
  22. update basic_operation_log t set t.operation_type = 'SAVE' where t.operation_type = 'EDIT';
  23. update basic_operation_log t set t.operation_type = 'OTHER' where t.operation_type = 'UN_KNOW';
  24. -- drop table if exists exam_detail_course_paper_type;
  25. -- drop table if exists basic_template_org;
  26. -- drop table if exists cloud_user_push_status;
  27. -- drop table if exists exam_card_detail;
  28. -- drop table if exists exam_paper_class_marker;
  29. -- drop table if exists exam_paper_group;
  30. -- drop table if exists exam_paper_group_marker;
  31. -- drop table if exists exam_paper_structure;
  32. -- drop table if exists exam_task_sync;
  33. -- drop table if exists t_sync_exam_log;
  34. -- drop table if exists t_sync_stmms_exam;
  35. -- delete脚本需要加上新增的表