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

42 lines
768 B
SQL

-- [REACTIONS]
create table reactions
(
key text primary key
, value text not null
);
insert into reactions (key, value) values
('ORDER BULK', '1')
, ('ORDER WALL', '1')
, ('ORDER TANK', '1')
, ('GLOBAL BULK', '0')
, ('GLOBAL WALL', '0')
, ('LIMITING POTENTIAL', '0')
, ('ROUGHNESS CORRELATION', '0')
;
create table reactions_pipe_bulk
(
pipe varchar(32) primary key references pipes(id) not null
, value numeric not null
);
-- delete when delete pipe
create table reactions_pipe_wall
(
pipe varchar(32) primary key references pipes(id) not null
, value numeric not null
);
-- delete when delete pipe
create table reactions_tank
(
tank varchar(32) primary key references tanks(id) not null
, value numeric not null
);
-- delete when delete tank