Refine reaction schema

This commit is contained in:
WQY\qiong
2022-11-11 21:13:39 +08:00
parent cd857009ff
commit 453e6391e2
2 changed files with 12 additions and 39 deletions

View File

@@ -1,42 +1,25 @@
-- [REACTIONS]
create type reactions_order_param as enum ('BULK', 'WALL', 'TANK');
create table reactions_order
(
key reactions_order_param not null
, value numeric not null
);
create type reactions_global_param as enum ('BULK', 'WALL');
create table reactions_global
(
key reactions_global_param not null
key text not null
, value numeric not null
);
create type reactions_pipe_param as enum ('BULK', 'WALL');
create table reactions_pipe
create table reactions_pipe_bulk
(
key reactions_pipe_param not null
, pipe varchar(32) references pipes(id) not null
pipe varchar(32) primary key references pipes(id) not null
, value numeric not null
);
create table reactions_pipe_wall
(
pipe varchar(32) primary key references pipes(id) not null
, value numeric not null
);
create table reactions_tank
(
tank varchar(32) references tanks(id) not null
tank varchar(32) primary key references tanks(id) not null
, value numeric not null
);
create table reactions_limiting_potential
(
value numeric not null
);
create table reactions_roughness_correlation
(
value numeric not null
);

View File

@@ -1,19 +1,9 @@
-- [REACTIONS]
drop table if exists reactions_roughness_correlation;
drop table if exists reactions_limiting_potential;
drop table if exists reactions_tank;
drop table if exists reactions_pipe;
drop table if exists reactions_pipe_wall;
drop type if exists reactions_pipe_param;
drop table if exists reactions_pipe_bulk;
drop table if exists reactions_global;
drop type if exists reactions_global_param;
drop table if exists reactions_order;
drop type if exists reactions_order_param;