fix 部分 mysql 存储创建索引异常

This commit is contained in:
bwcx_jzy 2024-01-12 11:52:02 +08:00
parent 8694703a25
commit 67ca19edcf
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53
4 changed files with 21 additions and 9 deletions

View File

@ -1,5 +1,12 @@
# 🚀 版本日志
### 2.11.0.13-beta (2024-01-12)
### 🐞 解决BUG、优化功能
1. 【server】修复 部分 mysql 存储创建索引异常
------
### 2.11.0.12-beta (2024-01-12)
### 🐣 新增功能

View File

@ -220,13 +220,16 @@ public class InitDb implements DisposableBean, ILoadEvent {
// 分隔后执行mysql 不能执行多条 sql 语句
List<String> list = StrUtil.isEmpty(sqlBuilderService.delimiter()) ?
CollUtil.newArrayList(sql) : StrUtil.splitTrim(sql, sqlBuilderService.delimiter());
int rows = list.stream().mapToInt(value -> {
try {
return parameter.execute(value);
} catch (SQLException e) {
throw Lombok.sneakyThrow(e);
}
}).sum();
int rows = list.stream()
.mapToInt(value -> {
try {
return parameter.execute(value);
} catch (SQLException e) {
log.warn("错误 sql:{}", value);
throw Lombok.sneakyThrow(e);
}
})
.sum();
log.info("exec init SQL file: {} complete, and affected rows is: {}", name, rows);
});
} catch (SQLException e) {

View File

@ -10,3 +10,5 @@ ADD,OUT_GIVING,modeData,String,500,,分发方式数据
ADD,FILE_RELEASE_TASK_LOG,fileType,TINYINT,,,文件类型
ADD,NODE_INFO,jpomProjectCount,Integer,,,jpom项目数,
ADD,NODE_INFO,jpomScriptCount,Integer,,,jpom脚本数,
ALTER,STATIC_FILE_STORAGE,parentAbsolutePath,String,300,,父级文件路径,false
ALTER,STATIC_FILE_STORAGE,absolutePath,String,300,,文件路径,false

1 alterType,tableName,name,type,len,defaultValue,comment,notNull
10 ADD,FILE_RELEASE_TASK_LOG,fileType,TINYINT,,,文件类型
11 ADD,NODE_INFO,jpomProjectCount,Integer,,,jpom项目数,
12 ADD,NODE_INFO,jpomScriptCount,Integer,,,jpom脚本数,
13 ALTER,STATIC_FILE_STORAGE,parentAbsolutePath,String,300,,父级文件路径,false
14 ALTER,STATIC_FILE_STORAGE,absolutePath,String,300,,文件路径,false

View File

@ -18,8 +18,8 @@ STATIC_FILE_STORAGE,modifyUser,String,50,,false,false,修改人,
STATIC_FILE_STORAGE,name,String,50,,true,false,集群名称,
STATIC_FILE_STORAGE,description,String,255,,false,false,描述,
STATIC_FILE_STORAGE,extName,String,50,,false,false,扩展名,
STATIC_FILE_STORAGE,absolutePath,String,500,,false,false,文件路径,
STATIC_FILE_STORAGE,parentAbsolutePath,String,500,,false,false,父级文件路径,
STATIC_FILE_STORAGE,absolutePath,String,300,,false,false,文件路径,
STATIC_FILE_STORAGE,parentAbsolutePath,String,300,,false,false,父级文件路径,
STATIC_FILE_STORAGE,staticDir,String,50,,false,false,配置的静态路径,
STATIC_FILE_STORAGE,status,TINYINT,,,false,false,"状态 0 不存在 1 存在",
STATIC_FILE_STORAGE,type,TINYINT,,,false,false,"类型 0 文件夹 1 文件",

1 tableName name type len defaultValue notNull primaryKey comment tableComment
18 STATIC_FILE_STORAGE description String 255 false false 描述
19 STATIC_FILE_STORAGE extName String 50 false false 扩展名
20 STATIC_FILE_STORAGE absolutePath String 500 300 false false 文件路径
21 STATIC_FILE_STORAGE parentAbsolutePath String 500 300 false false 父级文件路径
22 STATIC_FILE_STORAGE staticDir String 50 false false 配置的静态路径
23 STATIC_FILE_STORAGE status TINYINT false false 状态 0 不存在 1 存在
24 STATIC_FILE_STORAGE type TINYINT false false 类型 0 文件夹 1 文件
25 STATIC_FILE_STORAGE scanTaskId Long false false 扫描任务id