migration: add columns for hashed values on ApiToken#65300
Merged
Conversation
Contributor
|
This PR has a migration; here is the generated SQL for --
-- Add field hashed_refresh_token to apitoken
--
ALTER TABLE "sentry_apitoken" ADD COLUMN "hashed_refresh_token" varchar(128) NULL;
--
-- Add field hashed_token to apitoken
--
ALTER TABLE "sentry_apitoken" ADD COLUMN "hashed_token" varchar(128) NULL; |
c72b981 to
880593f
Compare
wedamija
approved these changes
Feb 16, 2024
tests/sentry/migrations/test_0647_apitoken_add_hashed_columns.py
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #65300 +/- ##
==========================================
- Coverage 81.47% 81.46% -0.01%
==========================================
Files 5255 5255
Lines 232091 232093 +2
Branches 45521 45521
==========================================
- Hits 189087 189086 -1
- Misses 37124 37126 +2
- Partials 5880 5881 +1
|
880593f to
49429bb
Compare
wedamija
approved these changes
Feb 16, 2024
Member
wedamija
left a comment
There was a problem hiding this comment.
lgtm, I think you just need to follow this instructions in that test failure to update snapshots
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In support of our improved API tokens initiative (getsentry/rfcs#32), this PR adds two null-able columns to the
ApiTokenmodel that will hold the hash values.Hashed values for token values will be implemented over several PRs to maintain backwards compatibility and to prevent broken state between versions.