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

migration(issue-views): Make groupsearchview.position nullable #87258

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

MichaelSun48
Copy link
Member

@MichaelSun48 MichaelSun48 commented Mar 18, 2025

This PR makes the groupsearchview.position column nullable. This is the first step to deleting the column entirely, since it's being superseded by the groupsearchviewstarred.position column.

The next steps after merging this are:

  1. Delete all usages of this column — Besides tests, there are already no more places where we are filtering based on the position, but we need to remove the position from any newly created entries.
  2. Add migration to safe delete the column w/ pending deletion_action=DeletionAction.MOVE_TO_PENDING
  3. Add migration to fully delete the column

^ If these steps are incorrect, please let me know. The migration docs seem to be a little unclear about this.

@MichaelSun48 MichaelSun48 requested a review from a team March 18, 2025 00:52
@MichaelSun48 MichaelSun48 requested a review from a team as a code owner March 18, 2025 00:52
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 18, 2025
@MichaelSun48 MichaelSun48 requested a review from a team March 18, 2025 00:53
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0843_make_groupsearchview_postition_nullable_for_deletion.py ()

--
-- Alter field position on groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "position" DROP NOT NULL;

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Schema change looks good.

@markstory
Copy link
Member

If these steps are incorrect, please let me know. The migration docs seem to be a little unclear about this.

Those are the correct steps 👍

@MichaelSun48 MichaelSun48 merged commit 79ec50d into master Mar 18, 2025
51 checks passed
@MichaelSun48 MichaelSun48 deleted the msun/sharedViews/makeGSVPositionNullable branch March 18, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants