Skip to content

Commit 7a42996

Browse files
author
zengqiao
committed
修复日志表字段过短问题
1 parent 37c3f69 commit 7a42996

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

docs/install_guide/版本升级手册.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ INSERT INTO `logi_security_role_permission` (`role_id`, `permission_id`, `is_del
2828
INSERT INTO `logi_security_role_permission` (`role_id`, `permission_id`, `is_delete`, `app_name`) VALUES ('1677', '2010', '0', 'know-streaming');
2929
INSERT INTO `logi_security_role_permission` (`role_id`, `permission_id`, `is_delete`, `app_name`) VALUES ('1677', '3000', '0', 'know-streaming');
3030

31+
-- 修改字段长度
32+
ALTER TABLE `logi_security_oplog`
33+
CHANGE COLUMN `operator_ip` `operator_ip` VARCHAR(64) NOT NULL COMMENT '操作者ip' ,
34+
CHANGE COLUMN `operator` `operator` VARCHAR(64) NULL DEFAULT NULL COMMENT '操作者账号' ,
35+
CHANGE COLUMN `operate_page` `operate_page` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '操作页面' ,
36+
CHANGE COLUMN `operate_type` `operate_type` VARCHAR(64) NOT NULL COMMENT '操作类型' ,
37+
CHANGE COLUMN `target_type` `target_type` VARCHAR(64) NOT NULL COMMENT '对象分类' ,
38+
CHANGE COLUMN `target` `target` VARCHAR(1024) NOT NULL COMMENT '操作对象' ,
39+
CHANGE COLUMN `operation_methods` `operation_methods` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '操作方式' ;
3140
```
3241

3342
---

km-dist/init/sql/ddl-logi-security.sql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ DROP TABLE IF EXISTS `logi_security_oplog`;
3333
CREATE TABLE `logi_security_oplog`
3434
(
3535
id int auto_increment primary key,
36-
operator_ip varchar(20) not null comment '操作者ip',
37-
operator varchar(20) null comment '操作者账号',
38-
operate_page varchar(16) not null default '' comment '操作页面',
39-
operate_type varchar(16) not null comment '操作类型',
40-
target_type varchar(16) not null comment '对象分类',
41-
target varchar(20) not null comment '操作对象',
42-
operation_methods varchar(20) not null default '' comment '操作方式',
36+
operator_ip varchar(64) not null comment '操作者ip',
37+
operator varchar(64) null comment '操作者账号',
38+
operate_page varchar(64) not null default '' comment '操作页面',
39+
operate_type varchar(64) not null comment '操作类型',
40+
target_type varchar(64) not null comment '对象分类',
41+
target varchar(1024) not null comment '操作对象',
42+
operation_methods varchar(64) not null default '' comment '操作方式',
4343
detail text null comment '日志详情',
4444
create_time timestamp default CURRENT_TIMESTAMP null,
4545
update_time timestamp default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
4646
is_delete tinyint(1) default 0 not null comment '逻辑删除',
4747
app_name varchar(16) null comment '应用名称'
4848
) ENGINE=InnoDB AUTO_INCREMENT=1592 DEFAULT CHARSET=utf8 comment '操作日志';
4949

50+
5051
DROP TABLE IF EXISTS `logi_security_oplog_extra`;
5152
CREATE TABLE `logi_security_oplog_extra`
5253
(

0 commit comments

Comments
 (0)