update:优化用户表sql语句

This commit is contained in:
hrz 2025-03-14 14:10:18 +08:00
parent b5bbd7f068
commit 13979ad016
3 changed files with 5 additions and 7 deletions

View file

@ -36,7 +36,7 @@ public class SysUserEntity extends BaseEntity {
* 更新者 * 更新者
*/ */
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private Long create_date; private Date createDate;
/** /**
* 更新者 * 更新者
*/ */

View file

@ -16,8 +16,7 @@ CREATE TABLE sys_user (
creator bigint COMMENT '创建者', creator bigint COMMENT '创建者',
update_date datetime COMMENT '更新时间', update_date datetime COMMENT '更新时间',
primary key (id), primary key (id),
unique key uk_username (username), unique key uk_username (username)
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统用户'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统用户';
-- 系统用户Token -- 系统用户Token
@ -46,8 +45,7 @@ create table sys_params
updater bigint COMMENT '更新者', updater bigint COMMENT '更新者',
update_date datetime COMMENT '更新时间', update_date datetime COMMENT '更新时间',
primary key (id), primary key (id),
unique key uk_param_code (param_code), unique key uk_param_code (param_code)
key idx_create_date (create_date)
)ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='参数管理'; )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='参数管理';
-- 字典类型 -- 字典类型

View file

@ -3,12 +3,12 @@
# 每次对数据表进行改动时,只允许新建新对changeSet,不允许对上一个changeSet配置及文件进行修改 # 每次对数据表进行改动时,只允许新建新对changeSet,不允许对上一个changeSet配置及文件进行修改
databaseChangeLog: databaseChangeLog:
- changeSet: - changeSet:
id: 202503141345 id: 202503141335
author: John author: John
changes: changes:
- sqlFile: - sqlFile:
encoding: utf8 encoding: utf8
path: classpath:db/changelog/202503141345.sql path: classpath:db/changelog/202503141335.sql
- changeSet: - changeSet:
id: 202503141346 id: 202503141346
author: czc author: czc