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,15 +1,15 @@
-- [PIPES]
CREATE TYPE PIPES_STATUS AS ENUM ('open', 'closed', 'cv');
create type pipes_status as enum ('open', 'closed', 'cv');
CREATE TABLE PIPES
create table pipes
(
ID VARCHAR(32) PRIMARY KEY REFERENCES _LINK(ID)
, Node1 VARCHAR(32) REFERENCES _NODE(ID) NOT NULL
, Node2 VARCHAR(32) REFERENCES _NODE(ID) NOT NULL
, Length NUMERIC NOT NULL
, Diameter NUMERIC NOT NULL
, Roughness NUMERIC NOT NULL
, Minor_Loss NUMERIC NOT NULL
, Status PIPES_STATUS 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
, length numeric not null
, diameter numeric not null
, roughness numeric not null
, minor_loss numeric not null
, status pipes_status not null
);