database: No longer store or retrieve InitialIP#7942
Merged
beautifulentropy merged 5 commits intomainfrom Jan 13, 2025
Merged
Conversation
mcpherrinm
reviewed
Jan 13, 2025
jprenken
approved these changes
Jan 13, 2025
aarongable
approved these changes
Jan 13, 2025
Contributor
aarongable
left a comment
There was a problem hiding this comment.
LGTM. Naively I'd expect this change to include a db schema change that drops this column from db-next -- is there a reason we're not doing that yet?
Member
Author
The path forward for removing the column didn’t feel solid enough to justify a schema change at this time. However, if you support modifying the table now, I’m happy to create another PR with the following migration: -- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE `registrations`
DROP COLUMN `initialIP`,
DROP KEY `initialIP_createdAt`;
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE `registrations`
ADD COLUMN `initialIP` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
ADD KEY `initialIP_createdAt` (`initialIP`, `createdAt`); |
Contributor
|
Yeah, I think doing that schema change now would be good, as "proof" that it's safe for SRE to drop the column (however they choose to do so) in Staging and then in Prod. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The initialIP column has been defaulted to 0.0.0.0 since #7760. Remove this field from the all structs while leaving the schema itself intact.
Part of #7917