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

Alter and add migration for amendAllocated column two-part tariff review #975

Merged
merged 4 commits into from
May 3, 2024

Conversation

Beckyrose200
Copy link
Contributor

Oppsie, I messed up!
During testing for the two-part tariff review screens, it was noted that some of the data for a charge element allocated volume wasn't persisting correctly. This is due to the table's column not being the correct data type.
The initial migration for the creation of the column calculated (now called amended_allocated) was on April 17th.
The column wasn't created properly and needed to be amended so that the decimal points weren't getting cut off.
Having checked the commit history in the repo there were no tags at the time, so rather than create a new migration, I went and edited the original migration instead.

This is where my oppsie happened.

The edited migration commit happened on the 17th (before the repo got tagged for release) however due to the length of PR I was working on, the actual PR itself didn't get merged until the 24th. The repo got tagged for a release between this on the 19th. This means the initial migration has been run on production and the edited version of the migration will not work for updating the column data type.

This PR reverts the migration file to its original state and adds a new migration that can be run to update the column data type. facepalm

Oppsie, I messed up! During testing for the two-part tariff review screens it was noted that some of the data for a charge elements allocated volume wasn't persisting correctly. This is due to the table's column not being the correct data type. The initial migration for the creation of the column calculated (now called amended_allocated) was on April 17th. The column wasn't created properly and needed to be amended so that the decimal points weren't getting cut off. Having checked the commit history in the repo there was no tags at the time, so rather than create a new migration, I went and edited the original migration instead. This is where my oppsie happened. The edited migration commit happened on the 17th (before the repo got taggged for release) however due to the length of PR I was working on the actual PR itself didn't get merged until the 24th. The repo got tagged for a release between this on the 19th. This means the initial migration has been run on production and the edited version of the migration will not work for updating the column data type. This PR is reverting the migration file back to its original state and add a new migration that can be run to update the column data type. *facePalm*
@Beckyrose200 Beckyrose200 self-assigned this May 3, 2024
@Beckyrose200 Beckyrose200 added the bug Something isn't working label May 3, 2024
@Beckyrose200 Beckyrose200 marked this pull request as ready for review May 3, 2024 16:01
@Beckyrose200 Beckyrose200 requested a review from Cruikshanks May 3, 2024 16:09
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

@Beckyrose200 Beckyrose200 merged commit f1c4f95 into main May 3, 2024
6 checks passed
@Beckyrose200 Beckyrose200 deleted the add-migration-for-review-charge-element branch May 3, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants