fix 时序数据库 timescaledb 物模型-数据库数据格式对应关系

V0.5.x
jay 2023-03-14 16:28:46 +08:00
parent ae75747a12
commit 5451dcd135
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ public class FieldParser {
private static final Map<String, DataType> TYPE_MAPPING = Map.of(
"int32", SQLDataType.INTEGER,
"float", SQLDataType.FLOAT,
"bool", SQLDataType.BOOLEAN,
"bool", SQLDataType.INTEGER,
"enum", SQLDataType.INTEGER,
"text", SQLDataType.NVARCHAR,
"date", SQLDataType.DATE
@ -42,7 +42,7 @@ public class FieldParser {
private static final Map<String, DataType> DB2TYPE_MAPPING = Map.of(
"int",SQLDataType.INTEGER,
"float", SQLDataType.FLOAT,
"bool", SQLDataType.BOOLEAN,
"bool", SQLDataType.INTEGER,
"char",SQLDataType.NVARCHAR,
"date", SQLDataType.DATE,
"timestamptz", SQLDataType.TIMESTAMPWITHTIMEZONE

View File

@ -147,7 +147,7 @@ public class DbStructureDataImpl implements IDbStructureData {
CreateTableColumnStep ruleLogStep = dslBuilder.createTableIfNotExists("rule_log")
.column("time", SQLDataType.TIMESTAMPWITHTIMEZONE.nullable(false))
.column("state1", SQLDataType.INTEGER)
.column("state1", SQLDataType.VARCHAR(50))
.column("content", SQLDataType.VARCHAR(1024))
.column("success", SQLDataType.BOOLEAN)
.column("rule_id", SQLDataType.VARCHAR(50).nullable(false));