fix staticDir 字段长度,避免 mysql 报错

This commit is contained in:
bwcx_jzy 2023-12-29 12:11:59 +08:00
parent 32ceab4edc
commit d5f45aad0e
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53
3 changed files with 13 additions and 1 deletions

View File

@ -63,6 +63,10 @@ public class StaticFileStorageModel extends BaseUserModifyDbModel implements IFi
*/
private String absolutePath;
private String parentAbsolutePath;
/**
* 要组索引不字段不能太长
* [42000][1071] Specified key was too long; max key length is 3072 bytes
*/
private String staticDir;
private Integer level;
/**

View File

@ -20,7 +20,7 @@ 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,staticDir,String,500,,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 文件",
STATIC_FILE_STORAGE,scanTaskId,Long,,,false,false,扫描任务id,

1 tableName name type len defaultValue notNull primaryKey comment tableComment
20 STATIC_FILE_STORAGE absolutePath String 500 false false 文件路径
21 STATIC_FILE_STORAGE parentAbsolutePath String 500 false false 父级文件路径
22 STATIC_FILE_STORAGE staticDir String 500 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
26 STATIC_FILE_STORAGE lastModified Long false false 最后修改时间

View File

@ -3,4 +3,12 @@
```shell
docker run -itd --name jpom-mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=k@4Qoi6qdV#OYjQd mysql
```
```shell
mysql -u root -p'k@4Qoi6qdV#OYjQd'
```
```shell
create database if not exists jpom default character set utf8mb4;
```