重构现代化 FastAPI 后端项目框架
This commit is contained in:
19
resources/sql/create/5.pipes.sql
Normal file
19
resources/sql/create/5.pipes.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- [PIPES]
|
||||
|
||||
create type pipes_status as enum ('OPEN', 'CLOSED', 'CV');
|
||||
|
||||
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 float8 not null
|
||||
, diameter float8 not null
|
||||
, roughness float8 not null
|
||||
, minor_loss float8 not null
|
||||
, status pipes_status not null
|
||||
, check (node1 <> node2)
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
Reference in New Issue
Block a user