Skip to content

Commit

Permalink
feat(new field): add customer_code to man_hydrant
Browse files Browse the repository at this point in the history
  • Loading branch information
mguzman14 committed Aug 12, 2024
1 parent 23acd44 commit b45aa7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions updates/36/36012/ws/ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD","table":"audit_psect

SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD","table":"connec", "column":"cat_valve", "dataType":"varchar(30)"}}$$);

SELECT gw_fct_admin_manage_fields($${"data":{"action":"ADD","table":"man_hydrant", "column":"customer_code", "dataType":"varchar"}}$$);


SELECT gw_fct_admin_manage_fields($${"data":{"action":"RENAME","table":"cat_arc", "column":"brand", "newName":"brand_id"}}$$);
SELECT gw_fct_admin_manage_fields($${"data":{"action":"RENAME","table":"cat_arc", "column":"model", "newName":"model_id"}}$$);
Expand Down
6 changes: 3 additions & 3 deletions ws/ftrg/ws_gw_trg_edit_node.sql
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ BEGIN
VALUES (NEW.node_id, NEW.vmax, NEW.vutil, NEW.area,NEW.chlorination, NEW.name, NEW.hmax);

ELSIF v_man_table='man_hydrant' THEN
INSERT INTO man_hydrant (node_id, fire_code, communication, valve, geom1, geom2, hydrant_type)
VALUES (NEW.node_id, NEW.fire_code, NEW.communication, NEW.valve, NEW.geom1, NEW.geom2, NEW.hydrant_type);
INSERT INTO man_hydrant (node_id, fire_code, communication, valve, geom1, geom2, hydrant_type, customer_code)
VALUES (NEW.node_id, NEW.fire_code, NEW.communication, NEW.valve, NEW.geom1, NEW.geom2, NEW.hydrant_type, NEW.customer_code);

ELSIF v_man_table='man_junction' THEN
INSERT INTO man_junction (node_id) VALUES(NEW.node_id);
Expand Down Expand Up @@ -955,7 +955,7 @@ BEGIN

ELSIF v_man_table ='man_hydrant' THEN
UPDATE man_hydrant SET fire_code=NEW.fire_code, communication=NEW.communication, valve=NEW.valve,
geom1=NEW.geom1, geom2=NEW.geom2, hydrant_type=NEW.hydrant_type
geom1=NEW.geom1, geom2=NEW.geom2, hydrant_type=NEW.hydrant_type, customer_code=NEW.customer_code
WHERE node_id=OLD.node_id;

ELSIF v_man_table ='man_source' THEN
Expand Down

0 comments on commit b45aa7c

Please sign in to comment.