Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_primary bool to function hierarchic vl #70

Merged
merged 8 commits into from
Apr 16, 2024
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions datamodel/changelogs/0001/05_data_model_extensions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ SET order_fct_hierarchic=
]
,code);

-- this column is an extension to the VSA data model and facilitates filtering out primary features
ALTER TABLE tww_vl.channel_function_hierarchic ADD COLUMN _is_primary bool;
cymed marked this conversation as resolved.
Show resolved Hide resolved
UPDATE tww_vl.channel_function_hierarchic
SET _is_primary=true
WHERE left(value_en, 4)='pwwf';
UPDATE tww_vl.channel_function_hierarchic
SET _is_primary=false
WHERE left(value_en, 4)<>'pwwf';
COMMENT ON COLUMN tww_vl.channel_function_hierarchic._is_primary IS 'True when part of the primary network. Facilitates exporting primary elements only.
Not part of the VSA-DSS data model, added solely for TEKSI Wastewater & GEP';

-- table wastewater_node is extended to hold additional attributes necessary for symbology reasons
-- extended attributes are started with an underscore
-- _usage_current is necessary for coloring the wastewater_node symbols
Expand Down