USE teachcloud_db;

ALTER TABLE `basic_operation_log`
DROP COLUMN `user_name`,
DROP COLUMN `return_value`,
DROP COLUMN `run_time`,
DROP COLUMN `method`,
DROP COLUMN `clazz_name`,
DROP COLUMN `system_type`,
DROP COLUMN `operation_unit`,
DROP COLUMN `customized_operation_type`,
DROP COLUMN `level`,
DROP COLUMN `org_id`,
ADD COLUMN `function_name` VARCHAR(100) NULL COMMENT '操作名称' AFTER `operation_type`,
CHANGE COLUMN `privilege_id` `privilege_id` BIGINT NULL DEFAULT NULL COMMENT '权限菜单id' AFTER `school_id`,
CHANGE COLUMN `detail` `detail` MEDIUMTEXT CHARACTER SET 'utf8mb4' NULL COMMENT '日志详情' AFTER `url`,
CHANGE COLUMN `operation_type` `operation_type` VARCHAR(32) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '操作类型（OTHER(“其它”),SELECT(\"查询\"),EDIT(\"新增或更新\"),DELETE(\"删除\")）' ,
DROP INDEX `operation_log_idx` ,
ADD INDEX `operation_log_idx` USING BTREE (`school_id`, `privilege_id`, `user_id`, `create_time`) VISIBLE;
;
