Merge branch 'master' into region

This commit is contained in:
WQY\qiong
2023-04-06 23:50:59 +08:00
9 changed files with 187 additions and 32 deletions

View File

@@ -1,3 +1,5 @@
create type scada_model_type as enum ('JUNCTION', 'RESERVOIR', 'TANK', 'PIPE', 'PUMP', 'VALVE');
create type scada_element_status as enum ('OFF', 'ON');
create table scada_element
@@ -7,5 +9,6 @@ create table scada_element
, y numeric not null
, device_id text references scada_device(id)
, model_id varchar(32) -- add constraint in API
, model_type scada_model_type
, status scada_element_status not null default 'OFF'
);

View File

@@ -1,3 +1,5 @@
drop table if exists scada_element;
drop type if exists scada_element_status;
drop type if exists scada_model_type;