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 );