Files
be.ems/database/upgrade/upg_sys_log_operate.sql

35 lines
2.0 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- MariaDB dump 10.19 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 192.168.2.219 Database: omc_db
-- ------------------------------------------------------
-- Server version 10.3.38-MariaDB
--
-- Table structure for table `sys_log_operate`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `sys_log_operate` (
`oper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志主键',
`title` varchar(50) DEFAULT '' COMMENT '模块标题',
`business_type` char(1) DEFAULT '0' COMMENT '业务类型0其它 1新增 2修改 3删除 4授权 5导出 6导入 7强退 8清空数据',
`method` varchar(100) DEFAULT '' COMMENT '方法名称',
`request_method` varchar(10) DEFAULT '' COMMENT '请求方式',
`operator_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'System' COMMENT '操作人员类别 来自用户类型',
`oper_name` varchar(50) DEFAULT '' COMMENT '操作人员',
`dept_name` varchar(50) DEFAULT '' COMMENT '部门名称',
`oper_url` varchar(255) DEFAULT '' COMMENT '请求URL',
`oper_ip` varchar(128) DEFAULT '' COMMENT '主机地址',
`oper_location` varchar(255) DEFAULT '' COMMENT '操作地点',
`oper_param` varchar(2000) DEFAULT '' COMMENT '请求参数',
`oper_msg` varchar(2000) DEFAULT '' COMMENT '操作消息',
`status` char(1) DEFAULT '0' COMMENT '操作状态0异常 1正常',
`oper_time` bigint(20) DEFAULT 0 COMMENT '操作时间',
`cost_time` bigint(20) DEFAULT 0 COMMENT '消耗时间(毫秒)',
PRIMARY KEY (`oper_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表';
ALTER TABLE `sys_log_operate` MODIFY COLUMN `operator_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'System' AFTER `request_method`;
ALTER TABLE `sys_log_operate` ADD COLUMN IF NOT EXISTS `tenant_id` varchar(32) NULL DEFAULT NULL AFTER `cost_time`;