Format sql

This commit is contained in:
WQY\qiong
2022-10-09 11:06:19 +08:00
parent d99c0eacbf
commit 9accb467b2
58 changed files with 283 additions and 283 deletions

View File

@@ -1,14 +1,14 @@
-- [VALVES]
CREATE TYPE VALVES_TYPE AS ENUM ('prv', 'psv', 'pbv', 'fcv', 'tcv', 'gpv');
create type valves_type as enum ('prv', 'psv', 'pbv', 'fcv', 'tcv', 'gpv');
CREATE TABLE VALVES
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
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
);