12 lines
299 B
SQL
12 lines
299 B
SQL
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'
|
|
);
|