Add table scada_model
This commit is contained in:
13
script/sql/create/29.scada_model.sql
Normal file
13
script/sql/create/29.scada_model.sql
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
create type scada_type as enum ('PRESSURE', 'DEMAND', 'QUALITY', 'LEVEL', 'FLOW');
|
||||||
|
|
||||||
|
create table scada_model
|
||||||
|
(
|
||||||
|
id text primary key
|
||||||
|
, x numeric not null
|
||||||
|
, y numeric not null
|
||||||
|
, device_id text not null unique
|
||||||
|
, device_name text
|
||||||
|
, address text
|
||||||
|
, type scada_type
|
||||||
|
, model_id varchar(32) -- add constraint in API
|
||||||
|
);
|
||||||
3
script/sql/drop/29.scada_model.sql
Normal file
3
script/sql/drop/29.scada_model.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
drop table if exists scada_model;
|
||||||
|
|
||||||
|
drop type if exists scada_type;
|
||||||
Reference in New Issue
Block a user