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

#1897 - database migration to change VAProfile and Participant IDs to big integers #1901

Conversation

MackHalliday
Copy link

@MackHalliday MackHalliday commented Aug 2, 2024

Description

issue #1897

  • Update participant_id and va_profile_id from Int to BigInt to avoid NumericValueOutOfRange error when updating VA Profile ID with a given Participant ID in the MPI lookup lambda
  • Downgrade will delete rows with va_profile_id values that cannnot be converted back to Int from BigInt
  • Downgrade will update participant_id to (-1) if the participant_id cannot be convert back to Int to BigInt
  • Updated docs regarding downgrades

Type of change

Please check the relevant option(s).

  • Bug fix (non-breaking change which fixes an issue)
  • Hotfix (quick fix for an urgent bug or issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation changes only

How Has This Been Tested?

Test Upgrade

  • Able to deploy successfully to DEV and migrations run as expected during test setup
  • Able to process records with participant_id that used to throw errors
Screenshot 2024-08-05 at 1 05 11 PM

image
image

Tested Downgrade

  • See Github Action here
  • Tested with @kalbfled. We added two rows on the VAProfileLocalCache table - one row with a participant_id of 9223372036854775800 and another with a va_profile_id of 9223372036854775800.
    Then we ran downgrade. The participant_id row was updated to -1 and the va_profile_id row was deleted.

image
Screenshot 2024-08-06 at 10 55 59 AM

Checklist

  • I have assigned myself to this PR
  • PR has an appropriate title: #9999 - What the thing does
  • PR has a detailed description, including links to specific documentation
  • I have added the appropriate labels to the PR.
  • I did not remove any parts of the template, such as checkboxes even if they are not used
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to any documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works. Testing guidelines
  • I have ensured the latest master is merged into my branch and all checks are green prior to review
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • The ticket is now moved into the DEV test column
  • I have added a bullet for this work to the Engineering Key Wins slide for review

@MackHalliday MackHalliday changed the title Squash #1897 - participant_id updated to biginit #1897 - participant_id updated to biginit Aug 2, 2024
@MackHalliday MackHalliday self-assigned this Aug 2, 2024
@MackHalliday MackHalliday changed the title #1897 - participant_id updated to biginit #1897 - participant_id and va_profile_id in VAProfileLocalCache updated to biginit Aug 5, 2024
@MackHalliday MackHalliday marked this pull request as ready for review August 5, 2024 17:15
@MackHalliday MackHalliday requested a review from a team as a code owner August 5, 2024 17:15
@MackHalliday MackHalliday changed the title #1897 - participant_id and va_profile_id in VAProfileLocalCache updated to biginit #1897 - participant_id and va_profile_id in VAProfileLocalCache updated to BigInt Aug 5, 2024
Copy link

@cris-oddball cris-oddball left a comment

Choose a reason for hiding this comment

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

please test the migration downgrade and indicate this was tested in the PR's description.

@MackHalliday MackHalliday marked this pull request as draft August 5, 2024 20:56
@EvanParish EvanParish merged commit af2d06e into master Aug 6, 2024
14 checks passed
@EvanParish EvanParish deleted the 1897-participant_id_column_throws_NumericValueOutOfRange_error branch August 6, 2024 15:43
@cris-oddball cris-oddball changed the title #1897 - participant_id and va_profile_id in VAProfileLocalCache updated to BigInt #1897 - database migration to change VAProfile and Participant IDs to big integers Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants