Files
TJWaterServer/script/sql/create/7.valves.sql
2022-12-17 11:10:15 +08:00

18 lines
435 B
SQL

-- [VALVES]
create type valves_type as enum ('PRV', 'PSV', 'PBV', 'FCV', 'TCV', 'GPV');
create table valves
(
id varchar(32) primary key references _link(id)
, node1 varchar(32) references _node(id) not null
, node2 varchar(32) references _node(id) not null
, diameter numeric not null
, type valves_type not null
, setting numeric not null
, minor_loss numeric not null
);
-- delete when delete node1
-- delete when delete node2