-
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 chargeVersionNotes
table model, helper and view
#1240
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
While creating the tests for the [Licence History page](#1182), we noticed we are missing the model and helper for the notes table. This is being referenced when extracting charge versions for a licence and any relating notes created. As a result, while creating the tests for the `fetch-licence-history.service` database errors occurred as a result of the unknown relation between the notes and charge versions table. This PR will add the model and helper for the `notes` table in the water schema.
rvsiyad
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Aug 7, 2024
rvsiyad
changed the title
Create
Create Aug 7, 2024
notes
table model and helpernotes
table view, model and helper
rvsiyad
changed the title
Create
Create Aug 7, 2024
notes
table view, model and helpernotes
table model, helper and view
rvsiyad
requested review from
Cruikshanks,
robertparkinson,
sujithvg,
Jozzey,
jonathangoulding and
Beckyrose200
August 12, 2024 11:26
Cruikshanks
removed request for
robertparkinson,
sujithvg,
Jozzey,
jonathangoulding and
Beckyrose200
August 12, 2024 13:04
rvsiyad
added a commit
to DEFRA/water-abstraction-service
that referenced
this pull request
Aug 12, 2024
* Fix type defaults on the water notes table https://eaflood.atlassian.net/browse/WATER-4566 During the creation of the licence history page, we noticed we were missing the model and helper for the notes table. This is being referenced when extracting charge versions for a licence and any relating notes created. This is being worked on in the [Create notes table model, helper and view](DEFRA/water-abstraction-system#1240) in water-abstraction-system repo. While working on the change, we realised the notes table has fields that are unused: - `licence_id` - is never populated - `type` - is always set to 'charge-version' - `type_id` - is set to the charge version's id and is not needed to link the two together We do not include these fields in the view for the notes table that we will add to [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system). However, `type` and `type_id` are set as not-nullable. This change defaults type to 'charge-version' and`type_id` will remove the constraint.
Cruikshanks
requested changes
Aug 13, 2024
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.
Just seem to be some tests got overlooked/missed.
Cruikshanks
requested changes
Aug 14, 2024
Cruikshanks
approved these changes
Aug 14, 2024
rvsiyad
changed the title
Create
Create Aug 14, 2024
notes
table model, helper and viewchargeVersionNotes
table model, helper and view
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-4566
While creating the tests for the Licence History page, we noticed we are missing the model and helper for the notes table. This is being referenced when extracting charge versions for a licence and any relating notes created. As a result, while creating the tests for the
fetch-licence-history.service
database errors occurred as a result of the unknown relation between the notes and charge versions table.As well as adding the model and helper for the chargeVersionNotes table, the unit tests will also require the creation of the chargeVersionNotes table in the test database. This also gives us the opportunity to add the view for the chargeVersionNotes table to the public schema.
This PR will add the model, helper and the view for the
notes
table in the water schema.