Refine scada tables

This commit is contained in:
WQY\qiong
2023-02-24 13:47:24 +08:00
parent c3ae9b306f
commit cef631b41b
10 changed files with 35 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
create type scada_element_status as enum ('OFF', 'ON');
create table scada_element
(
id text primary key
, x numeric not null
, y numeric not null
, device_id text references scada_device(id)
, model_id varchar(32) -- add constraint in API
, status scada_element_status not null default 'OFF'
);