feat: build vehicle data platform and production pipeline
This commit is contained in:
@@ -54,6 +54,7 @@ func SchemaStatements(database string) []string {
|
||||
latitude DOUBLE,
|
||||
altitude_m DOUBLE,
|
||||
speed_kmh DOUBLE,
|
||||
soc_percent DOUBLE,
|
||||
direction_deg INT,
|
||||
alarm_flag BIGINT,
|
||||
status_flag BIGINT,
|
||||
@@ -64,3 +65,13 @@ func SchemaStatements(database string) []string {
|
||||
)`,
|
||||
}
|
||||
}
|
||||
|
||||
// SchemaMigrationStatements contains additive TDengine changes that must also
|
||||
// be applied to an already existing stable. The writer treats duplicate-column
|
||||
// errors as success so startup remains idempotent across releases.
|
||||
func SchemaMigrationStatements(database string) []string {
|
||||
if database == "" {
|
||||
database = DefaultDatabase
|
||||
}
|
||||
return []string{"ALTER STABLE " + database + ".vehicle_locations ADD COLUMN soc_percent DOUBLE"}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user