Skip to content

ref(repositories): Drop old project/repository columns#115741

Merged
wedamija merged 2 commits into
masterfrom
danf/drop-old-fk-columns
May 18, 2026
Merged

ref(repositories): Drop old project/repository columns#115741
wedamija merged 2 commits into
masterfrom
danf/drop-old-fk-columns

Conversation

@wedamija
Copy link
Copy Markdown
Member

Summary

Phase 2 of SafeRemoveField: drop the project_id and repository_id columns from sentry_repositoryprojectpathconfig and seer_projectrepository.

Phase 1 (MOVE_TO_PENDING) was deployed in #115663.

Test plan

  • Migrations apply cleanly
  • No code references these columns — all reads and writes were removed in prior PRs

Phase 2 of SafeRemoveField: actually drop the pending columns from
RepositoryProjectPathConfig and SeerProjectRepository.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@wedamija wedamija requested a review from a team as a code owner May 18, 2026 19:20
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 18, 2026
Schema changes are never post-deployment.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1099_drop_old_fk_columns.py src/sentry/seer/migrations/0017_drop_old_fk_columns.py

for 1099_drop_old_fk_columns in sentry

--
-- Remove field project from repositoryprojectpathconfig
--
ALTER TABLE "sentry_repositoryprojectpathconfig" DROP COLUMN "project_id" CASCADE;
--
-- Remove field repository from repositoryprojectpathconfig
--
ALTER TABLE "sentry_repositoryprojectpathconfig" DROP COLUMN "repository_id" CASCADE;

for 0017_drop_old_fk_columns in seer

--
-- Remove field project from seerprojectrepository
--
ALTER TABLE "seer_projectrepository" DROP COLUMN "project_id" CASCADE;
--
-- Remove field repository from seerprojectrepository
--
ALTER TABLE "seer_projectrepository" DROP COLUMN "repository_id" CASCADE;

@wedamija wedamija merged commit f2d2c15 into master May 18, 2026
85 of 87 checks passed
@wedamija wedamija deleted the danf/drop-old-fk-columns branch May 18, 2026 21:18
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