Alter and add migration for amendAllocated column two-part tariff review #975
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.
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