Files
TJWaterServer/script/sql/create/7.valves.sql
2023-03-01 23:20:04 +08:00

18 lines
432 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 text not null
, minor_loss numeric not null
);
-- delete when delete node1
-- delete when delete node2