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

Create water schema models & helpers #560

Merged
merged 19 commits into from
Dec 5, 2023
Merged

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Dec 1, 2023

https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff we are going to be creating all our new tables in the default public schema.

We have also decided that when there is a legacy table that we are still going to need we will create a View of it in the public schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities that are currently sat in different schemas. The first example of this approach was done in PR #531 .

This change adds the models and helpers for the views in the water schema that were created in PR #551

The final step will then be to refactor the existing code to use the new models and delete the old legacy ones.

https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff we are going to be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities that are currently sat in different schemas. The first example of this approach was done in PR #531 .

This change adds the models and helpers for the views in the `water` schema that were created in a previous PR #551

> The final step will then be to refactor the existing code to use the new models and delete the old legacy ones.
@Jozzey Jozzey added the housekeeping Refactoring, tidying up or other work which supports the project label Dec 1, 2023
@Jozzey Jozzey self-assigned this Dec 1, 2023
test/support/helpers/bill.helper.js Dismissed Show dismissed Hide dismissed
@Jozzey
Copy link
Contributor Author

Jozzey commented Dec 5, 2023

SonarCloud is complaining about duplicated lines. This is because until we switch to using our new models based on the views we effectively have 2 versions of each model, one based on the views and the other on the tables. This will be resolved once we have updated our code to use the new view-based models and removed the old ones.

@Jozzey Jozzey marked this pull request as ready for review December 5, 2023 11:57
@Jozzey Jozzey merged commit 54b7aa9 into main Dec 5, 2023
6 of 7 checks passed
@Jozzey Jozzey deleted the create-view-models-for-water branch December 5, 2023 13:36
Jozzey added a commit that referenced this pull request Dec 5, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create water schema views](#551). Then in [Create water schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Cruikshanks added a commit that referenced this pull request Dec 5, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create WATER schema views](#551). Then in [Create WATER schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Cruikshanks added a commit that referenced this pull request Dec 8, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create WATER schema views](#551). Then in [Create WATER schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Cruikshanks added a commit that referenced this pull request Dec 14, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create WATER schema views](#551). Then in [Create WATER schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Cruikshanks added a commit that referenced this pull request Dec 15, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create WATER schema views](#551). Then in [Create WATER schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Cruikshanks added a commit that referenced this pull request Dec 15, 2023
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will create all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create WATER schema views](#551). Then in [Create WATER schema models & helpers](#560) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants