Skip to content

Commit

Permalink
fix & clean code (updates/36012): Various updates from prev commits
Browse files Browse the repository at this point in the history
  • Loading branch information
xtorret committed Aug 18, 2024
1 parent 5a35ccc commit eb42cdf
Show file tree
Hide file tree
Showing 17 changed files with 1,606 additions and 1,862 deletions.
2 changes: 2 additions & 0 deletions example/user/ud/ud_99_sample_zfinal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ SET search_path = 'SCHEMA_NAME', public, pg_catalog;
INSERT INTO selector_sector SELECT sector_id, current_user from sector where sector_id > 0 ON CONFLICT (sector_id, cur_user) DO NOTHING;
DELETE FROM selector_psector;

INSERT INTO selector_muni SELECT muni_id,current_user FROM ext_municipality ON CONFLICT (muni_id, cur_user) DO NOTHING;

UPDATE cat_feature SET id = 'OVERFLOW_STORAGE' WHERE id = 'OWERFLOW_STORAGE';

INSERT INTO cat_node (id, matcat_id, shape, geom1, geom2, geom3, descript, link, brand, model, svg, estimated_y, cost_unit, "cost", active, "label", node_type, acoeff) VALUES('CHANGE_1', NULL, NULL, 1.00, 1.00, NULL, 'Change', NULL, NULL, NULL, NULL, 2.00, 'u', NULL, true, NULL, 'CHANGE', NULL);
Expand Down
14 changes: 10 additions & 4 deletions example/user/ws/ws_97_sample_inp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,11 @@ INSERT INTO inp_pipe VALUES ('113907', NULL, 'OPEN', NULL, NULL, NULL, NULL, NUL
INSERT INTO inp_pipe VALUES ('113905', NULL, 'OPEN', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO inp_pipe VALUES ('113906', NULL, 'OPEN', NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO inp_pump VALUES ('113951', NULL, 'PUMP_01', NULL, NULL, 'OPEN', '114026', NULL, NULL, 'PRESSPUMP', NULL, NULL, NULL);
INSERT INTO inp_pump VALUES ('1105', NULL, 'PUMP_02', NULL, NULL, 'OPEN', '113881', NULL, NULL, 'FLOWPUMP', NULL, NULL, NULL);
UPDATE man_pump SET to_arc = '114026' WHERE node_id ='113951';
UPDATE man_pump SET to_arc = '113881' WHERE node_id ='1105';

INSERT INTO inp_pump VALUES ('113951', NULL, 'PUMP_01', NULL, NULL, 'OPEN', NULL, NULL, 'PRESSPUMP', NULL, NULL, NULL);
INSERT INTO inp_pump VALUES ('1105', NULL, 'PUMP_02', NULL, NULL, 'OPEN', NULL, NULL, 'FLOWPUMP', NULL, NULL, NULL);

INSERT INTO inp_pump_additional VALUES (1, '1105', 1, NULL, 'PUMP_02', NULL, NULL, 'CLOSED', NULL, NULL, NULL, NULL, NULL);

Expand Down Expand Up @@ -1119,5 +1122,8 @@ INSERT INTO inp_shortpipe VALUES ('114254', NULL, NULL, NULL);
INSERT INTO inp_inlet VALUES ('113766', 1.0000, 0.0000, 3.5000, 12.0000, 0.0000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO inp_inlet VALUES ('113952', 1.0000, 0.0000, 3.5000, 12.0000, 0.0000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO inp_valve VALUES ('1083', 'PRV', 30.0000, 100.0000, NULL, NULL, NULL, NULL, 'ACTIVE', '2095', NULL, NULL);
INSERT INTO inp_valve VALUES ('1107', 'FCV', NULL, 100.0000, 3.0000, NULL, NULL, NULL, 'CLOSED', '113884', NULL, NULL);
UPDATE man_valve SET to_arc = '113884', closed = true, active=true WHERE node_id = '1107';
UPDATE man_valve SET to_arc = '2095', active=true WHERE node_id = '1083';

INSERT INTO inp_valve VALUES ('1083', 'PRV', 30.0000, 100.0000, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO inp_valve VALUES ('1107', 'FCV', NULL, 100.0000, 3.0000, NULL, NULL, NULL, NULL, NULL);
2 changes: 2 additions & 0 deletions example/user/ws/ws_99_sample_zfinal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ SET search_path = 'SCHEMA_NAME', public, pg_catalog;
INSERT INTO selector_sector SELECT sector_id, current_user from sector where sector_id > 0 ON CONFLICT (sector_id, cur_user) DO NOTHING;
DELETE FROM selector_psector;

INSERT INTO selector_muni SELECT muni_id,current_user FROM ext_municipality ON CONFLICT (muni_id, cur_user) DO NOTHING;

UPDATE cat_arc SET active=TRUE WHERE arctype_id='VARC' AND id='VIRTUAL';

UPDATE om_visit SET startdate = startdate - random() * (startdate - timestamp '2022-01-01 10:00:00');
Expand Down
18 changes: 15 additions & 3 deletions updates/36/36012/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@
- New view v_ext_municipality filtered by selected exploitations. Use it on search tool
- New behaviour for inlets as a junctions when they are on the end of a sector without continuity with the next one
- Add new fields on inventory tables for UD node, arc, connec, gully: placement_type ,
- Add new field for UD outfall: reception_env_name
- Change all columns `code` from varchar(30) to text
- New mapzone for WS: macrominsector
- New mapzone for WS: macrominsector with new colums for arc, node, connec, link
- New stragegy for dynamic filter by joined use of sector-expl-muni
- New mapzone columns for:
UD
- drainzone, dma (sector_id)
- raingage (muni_id)
UTILS
- samplepoint (muni_id, sector_id)
- element (muni_id, sector_id)
- link (muni_id, sector_id)
- dimensions (muni_id, sector_id)
WS
- pond & pool (muni_id)
- presszone, dma, dqa (sector_id)
- New columns for WS mapzones: presszone_type, dma_type, dqa_type
- New columns for WS mapzones: sector_id
- New views unfiltered (vu) for WS mapzones
- Remove expl_id2 for mapzones
- Various bugs fixed

1 change: 1 addition & 0 deletions updates/36/36012/ud/ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ CREATE INDEX gully_muni ON gully USING btree (muni_id);
SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD", "table":"raingage", "column":"muni_id", "dataType":"integer"}}$$);
SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD", "table":"connec", "column":"n_hydrometer", "dataType":"integer"}}$$);
SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD", "table":"drainzone", "column":"sector_id", "dataType":"integer"}}$$);
SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD", "table":"dma", "column":"sector_id", "dataType":"integer"}}$$);

Loading

0 comments on commit eb42cdf

Please sign in to comment.