-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
migration: add columns for hashed values on ApiToken #65300
Conversation
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
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
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.
lgtm, I think you just need to follow this instructions in that test failure to update snapshots
In support of our improved API tokens initiative (getsentry/rfcs#32), this PR adds two null-able columns to the
ApiToken
model 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.