1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-04 10:38:19 +08:00

feat(sql): 优化数据表结构

This commit is contained in:
2022-08-11 17:43:42 +08:00
parent 6883a464db
commit f61294c5f3
4 changed files with 18 additions and 8 deletions
+2
View File
@@ -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 {
}
+8 -7
View File
@@ -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;