Initial commit
This commit is contained in:
BIN
script/package/PyMetis-2018.1-cp34-cp34m-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2018.1-cp34-cp34m-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2019.1.1-cp35-cp35m-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2019.1.1-cp35-cp35m-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2019.1.1-cp36-cp36m-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2019.1.1-cp36-cp36m-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2020.1-cp310-cp310-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2020.1-cp310-cp310-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2020.1-cp37-cp37m-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2020.1-cp37-cp37m-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2020.1-cp38-cp38-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2020.1-cp38-cp38-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/PyMetis-2020.1-cp39-cp39-win_amd64.whl
Normal file
BIN
script/package/PyMetis-2020.1-cp39-cp39-win_amd64.whl
Normal file
Binary file not shown.
BIN
script/package/pkg-pymetis-2023.1.1-py312h95578b8_4.tar
Normal file
BIN
script/package/pkg-pymetis-2023.1.1-py312h95578b8_4.tar
Normal file
Binary file not shown.
36
script/sql/create/0.base.sql
Normal file
36
script/sql/create/0.base.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
create type _node_type as enum ('junction', 'reservoir', 'tank');
|
||||
|
||||
create type _link_type as enum ('pipe', 'pump', 'valve');
|
||||
|
||||
create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS');
|
||||
|
||||
create type _region_type as enum ('NONE', 'DMA', 'SA', 'VD', 'WDA');
|
||||
|
||||
create table _node
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _node_type not null
|
||||
);
|
||||
|
||||
create table _link
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _link_type not null
|
||||
);
|
||||
|
||||
create table _curve
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _curve_type not null
|
||||
);
|
||||
|
||||
create table _pattern
|
||||
(
|
||||
id varchar(32) primary key
|
||||
);
|
||||
|
||||
create table _region
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type _region_type not null
|
||||
);
|
||||
8
script/sql/create/1.title.sql
Normal file
8
script/sql/create/1.title.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [TITLE]
|
||||
|
||||
create table title
|
||||
(
|
||||
value text
|
||||
);
|
||||
|
||||
insert into title (value) values ('');
|
||||
13
script/sql/create/10.status.sql
Normal file
13
script/sql/create/10.status.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [STATUS]
|
||||
|
||||
create type link_status as enum ('OPEN', 'CLOSED', 'ACTIVE');
|
||||
|
||||
create table status
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, status link_status
|
||||
, setting float8
|
||||
, check (status is not null or setting is not null)
|
||||
);
|
||||
|
||||
-- ddelete when delete link
|
||||
8
script/sql/create/11.patterns.sql
Normal file
8
script/sql/create/11.patterns.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [PATTERNS]
|
||||
|
||||
create table patterns
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _pattern(id) not null
|
||||
, factor float8 not null
|
||||
);
|
||||
9
script/sql/create/12.curves.sql
Normal file
9
script/sql/create/12.curves.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [CURVES]
|
||||
|
||||
create table curves
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _curve(id) not null
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
);
|
||||
7
script/sql/create/13.controls.sql
Normal file
7
script/sql/create/13.controls.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [CONTROLS]
|
||||
|
||||
create table controls
|
||||
(
|
||||
_order serial primary key
|
||||
, line text not null
|
||||
);
|
||||
7
script/sql/create/14.rules.sql
Normal file
7
script/sql/create/14.rules.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [RULES]
|
||||
|
||||
create table rules
|
||||
(
|
||||
_order serial primary key
|
||||
, line text not null
|
||||
);
|
||||
40
script/sql/create/15.energy.sql
Normal file
40
script/sql/create/15.energy.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- [ENERGY]
|
||||
|
||||
create table energy
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into energy (key, value) values
|
||||
('GLOBAL PRICE', '0')
|
||||
, ('GLOBAL PATTERN', '')
|
||||
, ('GLOBAL EFFIC', '75')
|
||||
, ('DEMAND CHARGE', '0')
|
||||
;
|
||||
|
||||
create table energy_pump_price
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, price float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
|
||||
create table energy_pump_pattern
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, pattern varchar(32) references _pattern(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete pattern
|
||||
|
||||
create table energy_pump_effic
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, effic varchar(32) references _curve(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete curve
|
||||
9
script/sql/create/16.emitters.sql
Normal file
9
script/sql/create/16.emitters.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [EMITTERS]
|
||||
|
||||
create table emitters
|
||||
(
|
||||
junction varchar(32) primary key references junctions(id)
|
||||
, coefficient float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete junction
|
||||
9
script/sql/create/17.quality.sql
Normal file
9
script/sql/create/17.quality.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [QUALITY]
|
||||
|
||||
create table quality
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, quality float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete ndoe
|
||||
14
script/sql/create/18.sources.sql
Normal file
14
script/sql/create/18.sources.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SOURCES]
|
||||
|
||||
create type sources_type as enum ('CONCEN', 'MASS', 'FLOWPACED', 'SETPOINT');
|
||||
|
||||
create table sources
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, s_type sources_type not null
|
||||
, strength float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
-- unset pattern when delete pattern
|
||||
41
script/sql/create/19.reactions.sql
Normal file
41
script/sql/create/19.reactions.sql
Normal file
@@ -0,0 +1,41 @@
|
||||
-- [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 float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pipe
|
||||
|
||||
create table reactions_pipe_wall
|
||||
(
|
||||
pipe varchar(32) primary key references pipes(id) not null
|
||||
, value float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pipe
|
||||
|
||||
create table reactions_tank
|
||||
(
|
||||
tank varchar(32) primary key references tanks(id) not null
|
||||
, value float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete tank
|
||||
7
script/sql/create/2.junctions.sql
Normal file
7
script/sql/create/2.junctions.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- [JUNCTIONS]
|
||||
|
||||
create table junctions
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, elevation float8 not null
|
||||
);
|
||||
12
script/sql/create/20.mixing.sql
Normal file
12
script/sql/create/20.mixing.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- [MIXING]
|
||||
|
||||
create type mixing_model as enum ('MIXED', '2COMP', 'FIFO', 'LIFO');
|
||||
|
||||
create table mixing
|
||||
(
|
||||
tank varchar(32) primary key references tanks(id)
|
||||
, model mixing_model not null
|
||||
, value float8
|
||||
);
|
||||
|
||||
-- delete when delete tank
|
||||
20
script/sql/create/21.times.sql
Normal file
20
script/sql/create/21.times.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- [TIMES]
|
||||
|
||||
create table times
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into times (key, value) values
|
||||
('DURATION', '0:00')
|
||||
, ('HYDRAULIC TIMESTEP', '1:00')
|
||||
, ('QUALITY TIMESTEP', '0:05')
|
||||
, ('RULE TIMESTEP', '0:05')
|
||||
, ('PATTERN TIMESTEP', '1:00')
|
||||
, ('PATTERN START', '0:00')
|
||||
, ('REPORT TIMESTEP', '1:00')
|
||||
, ('REPORT START', '0:00')
|
||||
, ('START CLOCKTIME', '12:00 AM')
|
||||
, ('STATISTIC', 'NONE') -- NONE / AVERAGED / MINIMUM / MAXIMUM / RANGE
|
||||
;
|
||||
18
script/sql/create/22.report.sql
Normal file
18
script/sql/create/22.report.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- [REPORT]
|
||||
|
||||
create table report
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into report (key, value) values
|
||||
('PAGESIZE', '0')
|
||||
--, ('FILE', '')
|
||||
, ('STATUS', 'FULL')
|
||||
, ('SUMMARY', 'YES')
|
||||
, ('MESSAGES', 'YES')
|
||||
, ('ENERGY', 'YES')
|
||||
, ('NODES', 'ALL')
|
||||
, ('LINKS', 'ALL')
|
||||
;
|
||||
77
script/sql/create/23.options.sql
Normal file
77
script/sql/create/23.options.sql
Normal file
@@ -0,0 +1,77 @@
|
||||
-- [OPTIONS]
|
||||
|
||||
-- TODO: constraint
|
||||
|
||||
create table options
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into options (key, value) values
|
||||
('UNITS', 'LPS')
|
||||
, ('PRESSURE', 'METERS')
|
||||
, ('HEADLOSS', 'H-W')
|
||||
, ('QUALITY', 'NONE')
|
||||
, ('UNBALANCED', 'STOP')
|
||||
, ('PATTERN', '1')
|
||||
, ('DEMAND MODEL', 'DDA')
|
||||
, ('DEMAND MULTIPLIER', '1.0')
|
||||
, ('EMITTER EXPONENT', '0.5')
|
||||
, ('VISCOSITY', '1.0')
|
||||
, ('DIFFUSIVITY', '1.0')
|
||||
, ('SPECIFIC GRAVITY', '1.0')
|
||||
, ('TRIALS', '40')
|
||||
, ('ACCURACY', '0.001')
|
||||
, ('HEADERROR', '0.0001')
|
||||
, ('FLOWCHANGE', '0.0001')
|
||||
, ('MINIMUM PRESSURE', '0.0001')
|
||||
, ('REQUIRED PRESSURE', '20.0')
|
||||
, ('PRESSURE EXPONENT', '0.5')
|
||||
, ('TOLERANCE', '0.01')
|
||||
, ('HTOL', '0.0005')
|
||||
, ('QTOL', '0.0001')
|
||||
, ('RQTOL', '0.0000001')
|
||||
, ('CHECKFREQ', '2')
|
||||
, ('MAXCHECK', '10')
|
||||
, ('DAMPLIMIT', '0')
|
||||
;
|
||||
|
||||
|
||||
create table options_v3
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into options_v3 (key, value) values
|
||||
('FLOW_UNITS', 'LPS')
|
||||
, ('PRESSURE_UNITS', 'METERS')
|
||||
, ('HEADLOSS_MODEL', 'H-W')
|
||||
, ('SPECIFIC_GRAVITY', '1.0')
|
||||
, ('SPECIFIC_VISCOSITY', '1.0')
|
||||
, ('MAXIMUM_TRIALS', '40')
|
||||
, ('HEAD_TOLERANCE', '0.0005')
|
||||
, ('FLOW_TOLERANCE', '0.0001')
|
||||
, ('FLOW_CHANGE_LIMIT', '0.0001')
|
||||
, ('RELATIVE_ACCURACY', '0.001')
|
||||
, ('TIME_WEIGHT', '0.0')
|
||||
, ('STEP_SIZING', 'FULL')
|
||||
, ('IF_UNBALANCED', 'STOP')
|
||||
, ('DEMAND_MODEL', 'FIXED')
|
||||
, ('DEMAND_PATTERN', '1')
|
||||
, ('DEMAND_MULTIPLIER', '1.0')
|
||||
, ('MINIMUM_PRESSURE', '0.0001')
|
||||
, ('SERVICE_PRESSURE', '20.0')
|
||||
, ('PRESSURE_EXPONENT', '0.5')
|
||||
, ('LEAKAGE_MODEL', 'NONE')
|
||||
, ('LEAKAGE_COEFF1', '0.0')
|
||||
, ('LEAKAGE_COEFF2', '0.0')
|
||||
, ('EMITTER_EXPONENT', '0.5')
|
||||
, ('QUALITY_MODEL', 'NONE')
|
||||
, ('QUALITY_NAME', 'CHEMICAL')
|
||||
, ('QUALITY_UNITS', 'MG/L')
|
||||
, ('TRACE_NODE', '')
|
||||
, ('SPECIFIC_DIFFUSIVITY', '1.0')
|
||||
, ('QUALITY_TOLERANCE', '0.01')
|
||||
;
|
||||
11
script/sql/create/24.coordinates.sql
Normal file
11
script/sql/create/24.coordinates.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [COORDINATES]
|
||||
|
||||
create table coordinates
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, coord geometry
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
|
||||
create index coordinates_gist on coordinates using gist(coord);
|
||||
11
script/sql/create/25.vertices.sql
Normal file
11
script/sql/create/25.vertices.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [VERTICES]
|
||||
|
||||
create table vertices
|
||||
(
|
||||
_order serial primary key
|
||||
, link varchar(32) references _link(id) not null
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete link
|
||||
12
script/sql/create/26.labels.sql
Normal file
12
script/sql/create/26.labels.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- [LABELS]
|
||||
|
||||
create table labels
|
||||
(
|
||||
x float8 not null
|
||||
, y float8 not null
|
||||
, label text not null
|
||||
, node varchar(32) references _node(id)
|
||||
, primary key (x, y)
|
||||
);
|
||||
|
||||
-- unset node when delete node
|
||||
8
script/sql/create/27.backdrop.sql
Normal file
8
script/sql/create/27.backdrop.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- [BACKDROP]
|
||||
|
||||
create table backdrop
|
||||
(
|
||||
content text primary key
|
||||
);
|
||||
|
||||
insert into backdrop (content) values ('');
|
||||
1
script/sql/create/28.end.sql
Normal file
1
script/sql/create/28.end.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- [END]
|
||||
9
script/sql/create/29.scada_device.sql
Normal file
9
script/sql/create/29.scada_device.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
create type scada_device_type as enum ('PRESSURE', 'DEMAND', 'QUALITY', 'LEVEL', 'FLOW', 'UNKNOWN');
|
||||
|
||||
create table scada_device
|
||||
(
|
||||
id text primary key
|
||||
, name text
|
||||
, address text
|
||||
, sd_type scada_device_type
|
||||
);
|
||||
10
script/sql/create/3.reservoirs.sql
Normal file
10
script/sql/create/3.reservoirs.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- [RESERVOIRS]
|
||||
|
||||
create table reservoirs
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, head float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
);
|
||||
|
||||
-- unset pattern when delete pattern
|
||||
7
script/sql/create/30.scada_device_data.sql
Normal file
7
script/sql/create/30.scada_device_data.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
create table scada_device_data
|
||||
(
|
||||
device_id text not null references scada_device(id)
|
||||
, time timestamp not null
|
||||
, value float8 not null
|
||||
, primary key (device_id, time)
|
||||
);
|
||||
14
script/sql/create/31.scada_element.sql
Normal file
14
script/sql/create/31.scada_element.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
create type scada_model_type as enum ('JUNCTION', 'RESERVOIR', 'TANK', 'PIPE', 'PUMP', 'VALVE');
|
||||
|
||||
create type scada_element_status as enum ('OFF', 'ON');
|
||||
|
||||
create table scada_element
|
||||
(
|
||||
id text primary key
|
||||
, x float8 not null
|
||||
, y float8 not null
|
||||
, device_id text references scada_device(id)
|
||||
, model_id varchar(32) -- add constraint in API
|
||||
, model_type scada_model_type
|
||||
, status scada_element_status not null default 'OFF'
|
||||
);
|
||||
48
script/sql/create/32.region.sql
Normal file
48
script/sql/create/32.region.sql
Normal file
@@ -0,0 +1,48 @@
|
||||
create type region_type as enum ('NONE', 'DMA', 'SA', 'VD', 'WDA');
|
||||
|
||||
create table region
|
||||
(
|
||||
id text primary key
|
||||
, boundary geometry not null --unique
|
||||
, r_type region_type not null default 'NONE'
|
||||
);
|
||||
|
||||
create index region_gist on region using gist(boundary);
|
||||
|
||||
|
||||
create table temp_region
|
||||
(
|
||||
id text primary key
|
||||
, boundary geometry not null unique
|
||||
);
|
||||
|
||||
create index temp_region_gist on temp_region using gist(boundary);
|
||||
|
||||
|
||||
create table temp_node
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
);
|
||||
|
||||
|
||||
create table temp_link_1
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, geom geometry not null unique
|
||||
);
|
||||
|
||||
|
||||
create table temp_link_2
|
||||
(
|
||||
link varchar(32) primary key references _link(id)
|
||||
, geom geometry not null unique
|
||||
);
|
||||
|
||||
|
||||
create table temp_vd_topology
|
||||
(
|
||||
id serial
|
||||
, source integer
|
||||
, target integer
|
||||
, cost float8
|
||||
);
|
||||
6
script/sql/create/33.dma.sql
Normal file
6
script/sql/create/33.dma.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
create table region_dma
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, parent text --references region_dma(id)
|
||||
, nodes text not null
|
||||
);
|
||||
7
script/sql/create/34.sa.sql
Normal file
7
script/sql/create/34.sa.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
create table region_sa
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, time_index integer not null
|
||||
, source varchar(32) not null -- references _node(id)
|
||||
, nodes text not null
|
||||
);
|
||||
6
script/sql/create/35.vd.sql
Normal file
6
script/sql/create/35.vd.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
create table region_vd
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, center varchar(32) not null -- references _node(id)
|
||||
, nodes text not null
|
||||
);
|
||||
5
script/sql/create/36.wda.sql
Normal file
5
script/sql/create/36.wda.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
create table region_wda
|
||||
(
|
||||
id text primary key references region(id)
|
||||
, demand float8 not null default 0.0
|
||||
);
|
||||
11
script/sql/create/37.history_patterns_flows.sql
Normal file
11
script/sql/create/37.history_patterns_flows.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- [HISTORY_PATTERNS_FLOWS]
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
-- Save pattern and pattern based history flow data. Use it for flow update pattern
|
||||
create table history_patterns_flows
|
||||
(
|
||||
_order serial primary key
|
||||
, id varchar(32) references _pattern(id) not null
|
||||
, factor float8 not null
|
||||
, flow float8 not null
|
||||
);
|
||||
44
script/sql/create/38.scada_info.sql
Normal file
44
script/sql/create/38.scada_info.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
-- [SCADA_INFO]
|
||||
-- 王名豪
|
||||
-- 2025/01/12
|
||||
-- 存储水厂提供的SCADA设备相关数据,包括设备ID、类型(reservoir_liquid_level/tank_liquid_level/fixed_pump/variable_pump/source_outflow/pipe_flow/pressure/demand/quality、关联的模型元素ID、关联的模式、
|
||||
-- 关联的干管流量计对应的模型元素ID(即demand(大用户)处于某个pipe_flow(干管流量计)之下,demand不是根据水量大小来确定的,而是根据设备情况和是否单独设置pattern决定
|
||||
-- 关联的出厂流量计对应的模型元素ID若干个(即确认该设备的水源是哪几个,根据水源不同,设置为不同的分区)
|
||||
-- SCADA设备通过数据接口查询的ID、传输模式(实时/非实时)、传输频率(多久传回一次数据)
|
||||
-- X坐标、Y坐标、基于X坐标和Y坐标生成geometry类型的数据
|
||||
|
||||
create table scada_info
|
||||
(
|
||||
id varchar(32) primary key
|
||||
, type varchar(32) not null
|
||||
, associated_element_id varchar(32) not null
|
||||
, associated_pattern varchar(32)
|
||||
, associated_pipe_flow_id varchar(32)
|
||||
, associated_source_outflow_id1 varchar(32)
|
||||
, associated_source_outflow_id2 varchar(32)
|
||||
, associated_source_outflow_id3 varchar(32)
|
||||
, associated_source_outflow_id4 varchar(32)
|
||||
, associated_source_outflow_id5 varchar(32)
|
||||
, associated_source_outflow_id6 varchar(32)
|
||||
, associated_source_outflow_id7 varchar(32)
|
||||
, associated_source_outflow_id8 varchar(32)
|
||||
, associated_source_outflow_id9 varchar(32)
|
||||
, associated_source_outflow_id10 varchar(32)
|
||||
, associated_source_outflow_id11 varchar(32)
|
||||
, associated_source_outflow_id12 varchar(32)
|
||||
, associated_source_outflow_id13 varchar(32)
|
||||
, associated_source_outflow_id14 varchar(32)
|
||||
, associated_source_outflow_id15 varchar(32)
|
||||
, associated_source_outflow_id16 varchar(32)
|
||||
, associated_source_outflow_id17 varchar(32)
|
||||
, associated_source_outflow_id18 varchar(32)
|
||||
, associated_source_outflow_id19 varchar(32)
|
||||
, associated_source_outflow_id20 varchar(32)
|
||||
, API_query_id varchar(32)
|
||||
, transmission_mode varchar(32) not null
|
||||
, transmission_frequency text not null
|
||||
, reliability int not null
|
||||
, X_coor float8 not null
|
||||
, Y_coor float8 not null
|
||||
, coord geometry
|
||||
)
|
||||
10
script/sql/create/39.users.sql
Normal file
10
script/sql/create/39.users.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- [USERS]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 存储系统的用户信息,如用户名,密码
|
||||
|
||||
create table users (
|
||||
user_id SERIAL PRIMARY KEY,
|
||||
username varchar(32) not null unique,
|
||||
password varchar(32) not null
|
||||
)
|
||||
18
script/sql/create/4.tanks.sql
Normal file
18
script/sql/create/4.tanks.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- [TANKS]
|
||||
|
||||
create type tanks_overflow as enum ('YES', 'NO');
|
||||
|
||||
create table tanks
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, elevation float8 not null
|
||||
, init_level float8 not null
|
||||
, min_level float8 not null
|
||||
, max_level float8 not null
|
||||
, diameter float8 not null
|
||||
, min_vol float8 not null
|
||||
, vol_curve varchar(32) references _curve(id)
|
||||
, overflow tanks_overflow
|
||||
);
|
||||
|
||||
-- unset vol_curve when delete curve
|
||||
14
script/sql/create/40.scheme_list.sql
Normal file
14
script/sql/create/40.scheme_list.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SCHEME_LIST]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 存储进行手动模拟后的方案列表
|
||||
|
||||
create table scheme_list (
|
||||
scheme_id SERIAL PRIMARY KEY,
|
||||
scheme_name varchar(32) not null,
|
||||
scheme_type varchar(32) not null,
|
||||
username varchar(32) not null REFERENCES "users"(username) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
create_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
scheme_start_time varchar(50) not null,
|
||||
scheme_detail JSON
|
||||
)
|
||||
13
script/sql/create/41.pipe_risk_probability.sql
Normal file
13
script/sql/create/41.pipe_risk_probability.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [PIPE_RISK_PROBABILITY]
|
||||
-- 王名豪
|
||||
-- 2025/04/16
|
||||
-- 存储管道风险评价结果
|
||||
|
||||
CREATE TABLE pipe_risk_probability (
|
||||
id SERIAL PRIMARY KEY,
|
||||
pipeID VARCHAR(255),
|
||||
pipeage FLOAT,
|
||||
risk_probability_now FLOAT,
|
||||
x FLOAT[], -- Since x is a list, it's stored as text (stringified list)
|
||||
y FLOAT[] -- Similarly, y will be stored as text (stringified list)
|
||||
);
|
||||
14
script/sql/create/42.sensor_placement.sql
Normal file
14
script/sql/create/42.sensor_placement.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- [SENSOR_PLACEMENT]
|
||||
-- 王名豪
|
||||
-- 2025/04/18
|
||||
-- 存储测压点的布置方案
|
||||
|
||||
CREATE TABLE sensor_placement (
|
||||
id SERIAL PRIMARY KEY,
|
||||
scheme_name varchar(32) not null,
|
||||
sensor_number int,
|
||||
min_diameter int,
|
||||
username varchar(32) not null REFERENCES "users"(username) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
create_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
sensor_location TEXT[]
|
||||
);
|
||||
13
script/sql/create/43.burst_locate_result.sql
Normal file
13
script/sql/create/43.burst_locate_result.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [BURST_LOCATE_RESULT]
|
||||
-- 王名豪
|
||||
-- 2025/04/19
|
||||
-- 存储爆管侦测定位结果
|
||||
|
||||
CREATE TABLE burst_locate_result (
|
||||
id SERIAL PRIMARY KEY,
|
||||
type varchar(32) not null,
|
||||
burst_incident varchar(32) not null,
|
||||
leakage float,
|
||||
detect_time TIMESTAMP WITH TIME ZONE not null DEFAULT date_trunc('minute', CURRENT_TIMESTAMP),
|
||||
locate_result JSON
|
||||
)
|
||||
19
script/sql/create/5.pipes.sql
Normal file
19
script/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
|
||||
19
script/sql/create/6.pumps.sql
Normal file
19
script/sql/create/6.pumps.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- [PUMPS]
|
||||
|
||||
create table pumps
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, node1 varchar(32) references _node(id) not null
|
||||
, node2 varchar(32) references _node(id) not null
|
||||
, power float8
|
||||
, head varchar(32) references _curve(id)
|
||||
, speed float8
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
, check (power is not null or head is not null)
|
||||
, check ((power is not null and head is not null) is false)
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
-- unset head when delete curve
|
||||
-- unset pattern when delete pattern
|
||||
17
script/sql/create/7.valves.sql
Normal file
17
script/sql/create/7.valves.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- [VALVES]
|
||||
|
||||
create type valves_type as enum ('PRV', 'PSV', 'PBV', 'FCV', 'TCV', 'GPV');
|
||||
|
||||
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 float8 not null
|
||||
, v_type valves_type not null
|
||||
, setting text not null
|
||||
, minor_loss float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete node1
|
||||
-- delete when delete node2
|
||||
17
script/sql/create/8.tags.sql
Normal file
17
script/sql/create/8.tags.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- [TAGS]
|
||||
|
||||
create table tags_node
|
||||
(
|
||||
id varchar(32) primary key references _node(id)
|
||||
, tag text not null
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
|
||||
create table tags_link
|
||||
(
|
||||
id varchar(32) primary key references _link(id)
|
||||
, tag text not null
|
||||
);
|
||||
|
||||
-- delete when delete link
|
||||
13
script/sql/create/9.demands.sql
Normal file
13
script/sql/create/9.demands.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- [DEMANDS]
|
||||
|
||||
create table demands
|
||||
(
|
||||
_order serial primary key
|
||||
, junction varchar(32) references junctions(id) not null
|
||||
, demand float8 not null
|
||||
, pattern varchar(32) references _pattern(id)
|
||||
, category text
|
||||
);
|
||||
|
||||
-- delete when delete junction
|
||||
-- unset pattern when delete pattern
|
||||
5
script/sql/create/extension_data.sql
Normal file
5
script/sql/create/extension_data.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
create table extension_data
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
55
script/sql/create/operation.sql
Normal file
55
script/sql/create/operation.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
create table operation
|
||||
(
|
||||
id bigserial primary key
|
||||
, redo text not null
|
||||
, undo text not null
|
||||
, parent integer references operation(id) on delete cascade
|
||||
, redo_child integer references operation(id) -- must update before delete
|
||||
, redo_cs text not null
|
||||
, undo_cs text not null
|
||||
);
|
||||
|
||||
insert into operation (id, redo, undo, redo_cs, undo_cs) values (0, '', '', '', '');
|
||||
|
||||
create table current_operation
|
||||
(
|
||||
id bigint primary key references operation(id) -- must update before delete
|
||||
);
|
||||
|
||||
insert into current_operation (id) values (0);
|
||||
|
||||
create table snapshot_operation
|
||||
(
|
||||
id bigint primary key references operation(id) on delete cascade
|
||||
, tag text not null unique
|
||||
);
|
||||
|
||||
create table restore_operation
|
||||
(
|
||||
id bigint primary key references operation(id) -- set after reading inp
|
||||
);
|
||||
|
||||
insert into restore_operation (id) values (0);
|
||||
|
||||
|
||||
create table batch_operation
|
||||
(
|
||||
id bigserial primary key
|
||||
, redo text not null
|
||||
, undo text not null
|
||||
, parent integer references operation(id) on delete cascade
|
||||
, redo_child integer references operation(id) -- must update before delete
|
||||
, redo_cs text not null
|
||||
, undo_cs text not null
|
||||
);
|
||||
|
||||
insert into batch_operation (id, redo, undo, redo_cs, undo_cs) values (0, '', '', '', '');
|
||||
|
||||
create type operation_table_option as enum ('operation', 'batch_operation');
|
||||
|
||||
create table operation_table
|
||||
(
|
||||
option operation_table_option primary key
|
||||
);
|
||||
|
||||
insert into operation_table (option) values ('operation');
|
||||
15
script/sql/drop/0.base.sql
Normal file
15
script/sql/drop/0.base.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
drop table if exists _region;
|
||||
|
||||
drop table if exists _pattern;
|
||||
|
||||
drop table if exists _curve;
|
||||
|
||||
drop table if exists _link;
|
||||
|
||||
drop table if exists _node;
|
||||
|
||||
drop type if exists _curve_type;
|
||||
|
||||
drop type if exists _link_type;
|
||||
|
||||
drop type if exists _node_type;
|
||||
3
script/sql/drop/1.title.sql
Normal file
3
script/sql/drop/1.title.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [TITLE]
|
||||
|
||||
drop table if exists title;
|
||||
5
script/sql/drop/10.status.sql
Normal file
5
script/sql/drop/10.status.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [STATUS]
|
||||
|
||||
drop table if exists status;
|
||||
|
||||
drop type if exists link_status;
|
||||
3
script/sql/drop/11.patterns.sql
Normal file
3
script/sql/drop/11.patterns.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [PATTERNS]
|
||||
|
||||
drop table if exists patterns;
|
||||
3
script/sql/drop/12.curves.sql
Normal file
3
script/sql/drop/12.curves.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [CURVES]
|
||||
|
||||
drop table if exists curves;
|
||||
3
script/sql/drop/13.controls.sql
Normal file
3
script/sql/drop/13.controls.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [CONTROLS]
|
||||
|
||||
drop table if exists controls;
|
||||
3
script/sql/drop/14.rules.sql
Normal file
3
script/sql/drop/14.rules.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [RULES]
|
||||
|
||||
drop table if exists rules;
|
||||
9
script/sql/drop/15.energy.sql
Normal file
9
script/sql/drop/15.energy.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [ENERGY]
|
||||
|
||||
drop table if exists energy_pump_effic;
|
||||
|
||||
drop table if exists energy_pump_pattern;
|
||||
|
||||
drop table if exists energy_pump_price;
|
||||
|
||||
drop table if exists energy;
|
||||
3
script/sql/drop/16.emitters.sql
Normal file
3
script/sql/drop/16.emitters.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [EMITTERS]
|
||||
|
||||
drop table if exists emitters;
|
||||
3
script/sql/drop/17.quality.sql
Normal file
3
script/sql/drop/17.quality.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [QUALITY]
|
||||
|
||||
drop table if exists quality;
|
||||
5
script/sql/drop/18.sources.sql
Normal file
5
script/sql/drop/18.sources.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [SOURCES]
|
||||
|
||||
drop table if exists sources;
|
||||
|
||||
drop type if exists sources_type;
|
||||
9
script/sql/drop/19.reactions.sql
Normal file
9
script/sql/drop/19.reactions.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- [REACTIONS]
|
||||
|
||||
drop table if exists reactions_tank;
|
||||
|
||||
drop table if exists reactions_pipe_wall;
|
||||
|
||||
drop table if exists reactions_pipe_bulk;
|
||||
|
||||
drop table if exists reactions;
|
||||
3
script/sql/drop/2.junctions.sql
Normal file
3
script/sql/drop/2.junctions.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [JUNCTIONS]
|
||||
|
||||
drop table if exists junctions;
|
||||
5
script/sql/drop/20.mixing.sql
Normal file
5
script/sql/drop/20.mixing.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [MIXING]
|
||||
|
||||
drop table if exists mixing;
|
||||
|
||||
drop type if exists mixing_model;
|
||||
3
script/sql/drop/21.times.sql
Normal file
3
script/sql/drop/21.times.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [TIMES]
|
||||
|
||||
drop table if exists times;
|
||||
3
script/sql/drop/22.report.sql
Normal file
3
script/sql/drop/22.report.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [REPORT]
|
||||
|
||||
drop table if exists report;
|
||||
5
script/sql/drop/23.options.sql
Normal file
5
script/sql/drop/23.options.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [OPTIONS]
|
||||
|
||||
drop table if exists options_v3;
|
||||
|
||||
drop table if exists options;
|
||||
5
script/sql/drop/24.coordinates.sql
Normal file
5
script/sql/drop/24.coordinates.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [COORDINATES]
|
||||
|
||||
drop index if exists coordinates_gist;
|
||||
|
||||
drop table if exists coordinates;
|
||||
3
script/sql/drop/25.vertices.sql
Normal file
3
script/sql/drop/25.vertices.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [VERTICES]
|
||||
|
||||
drop table if exists vertices;
|
||||
3
script/sql/drop/26.labels.sql
Normal file
3
script/sql/drop/26.labels.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [LABELS]
|
||||
|
||||
drop table if exists labels;
|
||||
3
script/sql/drop/27.backdrop.sql
Normal file
3
script/sql/drop/27.backdrop.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [BACKDROP]
|
||||
|
||||
drop table if exists backdrop;
|
||||
1
script/sql/drop/28.end.sql
Normal file
1
script/sql/drop/28.end.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- [END]
|
||||
3
script/sql/drop/29.scada_device.sql
Normal file
3
script/sql/drop/29.scada_device.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
drop table if exists scada_device;
|
||||
|
||||
drop type if exists scada_device_type;
|
||||
3
script/sql/drop/3.reservoirs.sql
Normal file
3
script/sql/drop/3.reservoirs.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [RESERVOIRS]
|
||||
|
||||
drop table if exists reservoirs;
|
||||
1
script/sql/drop/30.scada_device_data.sql
Normal file
1
script/sql/drop/30.scada_device_data.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists scada_device_data;
|
||||
5
script/sql/drop/31.scada_element.sql
Normal file
5
script/sql/drop/31.scada_element.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
drop table if exists scada_element;
|
||||
|
||||
drop type if exists scada_element_status;
|
||||
|
||||
drop type if exists scada_model_type;
|
||||
17
script/sql/drop/32.region.sql
Normal file
17
script/sql/drop/32.region.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
drop table if exists temp_vd_topology;
|
||||
|
||||
drop table if exists temp_link_2;
|
||||
|
||||
drop table if exists temp_link_1;
|
||||
|
||||
drop table if exists temp_node;
|
||||
|
||||
drop index if exists temp_region_gist;
|
||||
|
||||
drop table if exists temp_region;
|
||||
|
||||
drop index if exists region_gist;
|
||||
|
||||
drop table if exists region;
|
||||
|
||||
drop type if exists region_type;
|
||||
1
script/sql/drop/33.dma.sql
Normal file
1
script/sql/drop/33.dma.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_dma;
|
||||
1
script/sql/drop/34.sa.sql
Normal file
1
script/sql/drop/34.sa.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_sa;
|
||||
1
script/sql/drop/35.vd.sql
Normal file
1
script/sql/drop/35.vd.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_vd;
|
||||
1
script/sql/drop/36.wda.sql
Normal file
1
script/sql/drop/36.wda.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists region_wda;
|
||||
3
script/sql/drop/37.history_patterns_flows.sql
Normal file
3
script/sql/drop/37.history_patterns_flows.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
drop table if exists history_patterns_flows;
|
||||
3
script/sql/drop/38.scada_info.sql
Normal file
3
script/sql/drop/38.scada_info.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- WMH
|
||||
-- 2025/01/12
|
||||
drop table if exists scada_info;
|
||||
5
script/sql/drop/39.users.sql
Normal file
5
script/sql/drop/39.users.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 删除user这张表
|
||||
|
||||
drop table if exists users;
|
||||
5
script/sql/drop/4.tanks.sql
Normal file
5
script/sql/drop/4.tanks.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [TANKS]
|
||||
|
||||
drop table if exists tanks;
|
||||
|
||||
drop type if exists tanks_overflow;
|
||||
6
script/sql/drop/40.scheme_list.sql
Normal file
6
script/sql/drop/40.scheme_list.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [SCHEME_LIST]
|
||||
-- 王名豪
|
||||
-- 2025/03/23
|
||||
-- 删除scheme_list这张表
|
||||
|
||||
drop table if exists scheme_list;
|
||||
6
script/sql/drop/41.pipe_risk_probability.sql
Normal file
6
script/sql/drop/41.pipe_risk_probability.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [PIPE_RISK_PROBABILITY]
|
||||
-- 王名豪
|
||||
-- 2025/04/16
|
||||
-- 删除pipe_risk_probability这张表
|
||||
|
||||
drop table if exists pipe_risk_probability;
|
||||
6
script/sql/drop/42.sensor_placement.sql
Normal file
6
script/sql/drop/42.sensor_placement.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [SENSOR_PLACEMENT]
|
||||
-- 王名豪
|
||||
-- 2025/04/18
|
||||
-- 删除sensor_placement这张表
|
||||
|
||||
drop table if exists sensor_placement;
|
||||
6
script/sql/drop/43.burst_locate_result.sql
Normal file
6
script/sql/drop/43.burst_locate_result.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- [BURST_LOCATE_RESULT]
|
||||
-- 王名豪
|
||||
-- 2025/04/19
|
||||
-- 删除burst_locate_result这张表
|
||||
|
||||
drop table if exists burst_locate_result;
|
||||
5
script/sql/drop/5.pipes.sql
Normal file
5
script/sql/drop/5.pipes.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [PIPES]
|
||||
|
||||
drop table if exists pipes;
|
||||
|
||||
drop type if exists pipes_status;
|
||||
3
script/sql/drop/6.pumps.sql
Normal file
3
script/sql/drop/6.pumps.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [PUMPS]
|
||||
|
||||
drop table if exists pumps;
|
||||
5
script/sql/drop/7.valves.sql
Normal file
5
script/sql/drop/7.valves.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [VALVES]
|
||||
|
||||
drop table if exists valves;
|
||||
|
||||
drop type if exists valves_type;
|
||||
5
script/sql/drop/8.tags.sql
Normal file
5
script/sql/drop/8.tags.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- [TAGS]
|
||||
|
||||
drop table if exists tags_link;
|
||||
|
||||
drop table if exists tags_node;
|
||||
3
script/sql/drop/9.demands.sql
Normal file
3
script/sql/drop/9.demands.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- [DEMANDS]
|
||||
|
||||
drop table if exists demands;
|
||||
1
script/sql/drop/extension_data.sql
Normal file
1
script/sql/drop/extension_data.sql
Normal file
@@ -0,0 +1 @@
|
||||
drop table if exists extension_data;
|
||||
13
script/sql/drop/operation.sql
Normal file
13
script/sql/drop/operation.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
drop table if exists operation_table;
|
||||
|
||||
drop type if exists operation_table_option;
|
||||
|
||||
drop table if exists batch_operation;
|
||||
|
||||
drop table if exists restore_operation;
|
||||
|
||||
drop table if exists snapshot_operation;
|
||||
|
||||
drop table if exists current_operation;
|
||||
|
||||
drop table if exists operation;
|
||||
Reference in New Issue
Block a user