Add sensor_placement and burse_locate_result
This commit is contained in:
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
|
||||
)
|
||||
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;
|
||||
Reference in New Issue
Block a user