Skip to content

ref(models): Delete CodeReviewEvent table [2/3]#109422

Draft
vaind wants to merge 1 commit intoref/delete-code-review-event-pendingfrom
ref/delete-code-review-event
Draft

ref(models): Delete CodeReviewEvent table [2/3]#109422
vaind wants to merge 1 commit intoref/delete-code-review-event-pendingfrom
ref/delete-code-review-event

Conversation

@vaind
Copy link
Contributor

@vaind vaind commented Feb 26, 2026

Drop the sentry_code_review_event table. This is the second step of the safe deletion process.

Stacked on #109420 (pending delete). Retarget to master after PR 1 merges.

This is PR 2 of 3:

  1. ref(models): Pending-delete CodeReviewEvent table [1/3] #109420SafeDeleteModel with MOVE_TO_PENDING (removes model from Django state)
  2. This PRSafeDeleteModel with DELETE (drops the table)
  3. Recreate the model with updated schema

@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1034_remove_code_review_event.py src/sentry/migrations/1035_delete_code_review_event.py

for 1034_remove_code_review_event in sentry

--
-- Moved model CodeReviewEvent to pending deletion state
--
-- (no-op)

for 1035_delete_code_review_event in sentry

--
-- Delete model CodeReviewEvent
--
DROP TABLE "sentry_code_review_event" CASCADE;

Drop the sentry_code_review_event table. This is the second step of the
safe deletion process (MOVE_TO_PENDING was in the previous migration).

The table will be recreated with an updated schema in a follow-up PR.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants