1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-04 18:48:20 +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> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
@@ -51,7 +51,7 @@ public class SQLSectionWrapper implements ConfigurationWrapper {
} }
@Override @Override
public @Nullable ConfigurationWrapper getConfigurationSection(@NotNull String path) { public @Nullable SQLSectionWrapper getConfigurationSection(@NotNull String path) {
return null; 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 CREATE TABLE IF NOT EXISTS conf
( (
`namespace` VARCHAR(255) NOT NULL, # `namespace` VARCHAR(255) NOT NULL, #
`section` VARCHAR(255) NOT NULL, # `section` VARCHAR(255) NOT NULL, # (ConfigPath)
`type` VARCHAR(255) NOT NULL, `type` VARCHAR(255) NOT NULL, # (Integer/Byte/List/Map/...)
`value` LONGTEXT, # (JSON格式) `value` MEDIUMTEXT, # (JSON格式)
`inline_comments` TEXT, # `inline_comments` TINYTEXT, #
`header_comments` MEDIUMTEXT, # `header_comments` TEXT, #
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`namespace`, `section`) PRIMARY KEY (`namespace`, `section`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4; DEFAULT CHARSET = utf8mb4;