mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2024-09-19 20:25:51 +00:00
feat(sql): 优化数据表结构
This commit is contained in:
parent
6883a464db
commit
f61294c5f3
@ -24,6 +24,8 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -51,7 +51,7 @@ public class SQLSectionWrapper implements ConfigurationWrapper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ConfigurationWrapper getConfigurationSection(@NotNull String path) {
|
||||
public @Nullable SQLSectionWrapper getConfigurationSection(@NotNull String path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
package cc.carm.lib.configuration.sql;
|
||||
|
||||
public class SQLValueParser {
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
CREATE TABLE IF NOT EXISTS conf
|
||||
(
|
||||
`namespace` VARCHAR(255) NOT NULL, # 记录配置文件的命名空间
|
||||
`section` VARCHAR(255) NOT NULL, # 记录配置文件数值的指定路径
|
||||
`type` VARCHAR(255) NOT NULL,
|
||||
`value` LONGTEXT, # 记录该配置项的值 (可能为JSON格式)
|
||||
`inline_comments` TEXT, # 记录配置文件的行内注释
|
||||
`header_comments` MEDIUMTEXT, # 记录配置文件的顶部注释
|
||||
`namespace` VARCHAR(255) NOT NULL, # 命名空间
|
||||
`section` VARCHAR(255) NOT NULL, # 配置路径 (ConfigPath)
|
||||
`type` VARCHAR(255) NOT NULL, # 数据类型 (Integer/Byte/List/Map/...)
|
||||
`value` MEDIUMTEXT, # 配置项的值 (可能为JSON格式)
|
||||
`inline_comments` TINYTEXT, # 行内注释
|
||||
`header_comments` TEXT, # 顶部注释
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`namespace`, `section`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user