refactor(db): align project template schema
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- [LEAKAGE_IDENTIFY_RESULT]
|
||||
-- 存储漏损识别任务的结果数据。
|
||||
|
||||
CREATE TABLE leakage_identify_result (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
scheme_name varchar NOT NULL,
|
||||
network varchar NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
|
||||
run_status varchar NOT NULL DEFAULT 'completed',
|
||||
error_message text,
|
||||
sensor_nodes jsonb NOT NULL DEFAULT '[]'::jsonb,
|
||||
result_rows jsonb NOT NULL DEFAULT '[]'::jsonb,
|
||||
node_area_map jsonb NOT NULL DEFAULT '{}'::jsonb,
|
||||
areas jsonb DEFAULT '[]'::jsonb,
|
||||
drawing_payload jsonb DEFAULT '{"type": "FeatureCollection", "features": []}'::jsonb,
|
||||
CONSTRAINT uq_leakage_identify_result_scheme UNIQUE (scheme_name)
|
||||
);
|
||||
Reference in New Issue
Block a user