Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Nov 4, 2025

This is part of the required steps to remove a column from Sentry: https://develop.sentry.dev/backend/application-domains/database-migrations/#deleting-columns.

This is a follow-up to #102474.

This fixes SENTRY-5BX8 and SENTRY-5BXW which are happening since we switched to the bulk deletion model (#102580).

Next PR: #102788

This is part of the required steps to remove a column from Sentry:
https://develop.sentry.dev/backend/application-domains/database-migrations/#deleting-columns.

This is a follow-up to #102474.

This fixes [SENTRY-5BX8](https://sentry.sentry.io/issues/6994851757/) and [SENTRY-5BXW](https://sentry.sentry.io/issues/6995699817/) which are happening since we switched to the bulk deletion model (#102580).
@armenzg armenzg self-assigned this Nov 4, 2025
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 4, 2025
model_name="grouphistory",
name="prev_history",
field=sentry.db.models.fields.foreignkey.FlexibleForeignKey(
db_constraint=False,
Copy link
Member Author

Choose a reason for hiding this comment

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

This the modification.

@armenzg armenzg marked this pull request as ready for review November 4, 2025 15:07
@armenzg armenzg requested a review from a team as a code owner November 4, 2025 15:07
@armenzg armenzg requested a review from a team November 4, 2025 15:07
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

This PR has a migration; here is the generated SQL for src/sentry/migrations/1002_group_history_prev_history_remove_db_constraint.py

for 1002_group_history_prev_history_remove_db_constraint in sentry

--
-- Alter field prev_history on grouphistory
--
SET CONSTRAINTS "sentry_grouphistory_prev_history_id_905ec402_fk_sentry_gr" IMMEDIATE; ALTER TABLE "sentry_grouphistory" DROP CONSTRAINT "sentry_grouphistory_prev_history_id_905ec402_fk_sentry_gr";

armenzg added a commit that referenced this pull request Nov 4, 2025
@armenzg
Copy link
Member Author

armenzg commented Nov 4, 2025

The migration drift failing is expected.

@armenzg armenzg merged commit 0d20e6e into master Nov 4, 2025
67 of 69 checks passed
@armenzg armenzg deleted the 1/db/prev_history/armenzg branch November 4, 2025 17:29
shashjar pushed a commit that referenced this pull request Nov 4, 2025
armenzg added a commit that referenced this pull request Nov 4, 2025
The bulk deletion added in #102580 with #102672 is working well.
armenzg added a commit that referenced this pull request Nov 5, 2025
The bulk deletion added in #102580 with #102672 is working well.
armenzg added a commit that referenced this pull request Nov 5, 2025
armenzg added a commit that referenced this pull request Nov 5, 2025
armenzg added a commit that referenced this pull request Nov 5, 2025
armenzg added a commit that referenced this pull request Nov 5, 2025
priscilawebdev pushed a commit that referenced this pull request Nov 6, 2025
priscilawebdev pushed a commit that referenced this pull request Nov 6, 2025
priscilawebdev pushed a commit that referenced this pull request Nov 6, 2025
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