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

Conversation

cymed
Copy link
Contributor

@cymed cymed commented Jan 9, 2024

Many functionalities such as SWMM or MIKE exports allow filtering elements of the primary wastewater network. Up to now, all those scripts hardcode a list of primary entries in tww_vl.channel_function_hierarchic, making it cumbersome for people that use vl extensions. To facilitate the exports (and make them quicker), I suggest adding a datamodel extensions in the vl table.

@cymed cymed changed the title Update 05_data_model_extensions.sql Add a is_primary to function hierarchic vl Jan 9, 2024
@cymed cymed changed the title Add a is_primary to function hierarchic vl Add is_primary bool to function hierarchic vl Jan 9, 2024
@3nids 3nids requested a review from sjib January 31, 2024 09:29
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cymed With our naming convention it should be _is_primary - isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or tww_is_primary (see #164)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cymed then let's do it like in #164 - then we are consistent

@sjib
Copy link
Contributor

sjib commented Feb 14, 2024

@cymed Would also be good to add the DEFAULT FALSE in the adaptions you made to tww_od.organisation see https://github.com/teksi/wastewater/pull/150/files

ALTER TABLE tww_od.organisation ADD COLUMN _active bool;
ALTER TABLE tww_od.organisation ADD COLUMN _local_extension bool;

@sjib
Copy link
Contributor

sjib commented Mar 4, 2024

@cymed cymed closed this Mar 5, 2024
@cymed cymed reopened this Mar 5, 2024
@cymed
Copy link
Contributor Author

cymed commented Apr 15, 2024

Tagging @sjib for review

Copy link
Contributor

@sjib sjib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tww_is_primary instead of is_primary to be consistent with #164

@cymed cymed merged commit ea9d2ce into teksi:main Apr 16, 2024
7 checks passed
@cymed cymed deleted the add_is_primary branch April 16, 2024 09:27
cymed added a commit that referenced this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants