-
Notifications
You must be signed in to change notification settings - Fork 0
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 crm_v2
schema models and helpers
#561
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 `crm_v2` schema that were created in PR #556 > The final step will then be to refactor the existing code to use the new models and delete the old legacy ones.
Cruikshanks
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Dec 1, 2023
SonarCloud is complaining about the duplication. But that is only to be expected until we can remove the legacy models. |
Jozzey
previously approved these changes
Dec 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the team, we think having both referenced makes it clearer where the data is coming from.
Some boy-scouting to update these models to match this newly agreed convention.
Jozzey
approved these changes
Dec 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
Cruikshanks
added a commit
that referenced
this pull request
Dec 4, 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 CRM_V2 schema views](#556). Then in [Create CRM_V2 schema models and helpers](#561) 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 CRM_V2 schema views](#556). Then in [Create CRM_V2 schema models and helpers](#561) 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
crm_v2
schema that were created in PR #556