Skip to content

chore(orchanizations): remove the new_id dual write and make the column nullable - #123856

Merged
ldelvoye merged 5 commits into
masterfrom
ldelvoye/chore/omt-remove-new-id-dual-write
Sep 9, 2026
Merged

chore(orchanizations): remove the new_id dual write and make the column nullable#123856
ldelvoye merged 5 commits into
masterfrom
ldelvoye/chore/omt-remove-new-id-dual-write

Conversation

@ldelvoye

@ldelvoye ldelvoye commented Sep 8, 2026

Copy link
Copy Markdown
Member

Refs INFRENG-450.

Step 6 of the column widening, code cleanups and prepare for the column to be dropped

The pk swap has landed, so the machinery that kept the shadow column
equal to the id is dead weight; inserts now let the identity generate
the id. The column is only marked pending here, since dropping it for
real needs its own deploy.
The swap is deployed and its migration is frozen, so the test can no
longer fail in a way anyone would act on.
@ldelvoye
ldelvoye requested review from a team as code owners September 8, 2026 22:35
@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

INFRENG-450

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 8, 2026
…remove-new-id-dual-write

# Conflicts:
#	migrations_lockfile.txt
Master landed 1165 and 1166 while this was open.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

for 1167_organizationmemberteam_drop_new_id_pending in sentry

--
-- Alter field new_id on organizationmemberteam
--
ALTER TABLE "sentry_organizationmember_teams" ALTER COLUMN "new_id" DROP NOT NULL;
--
-- Moved organizationmemberteam.new_id field to pending deletion state
--
-- (no-op)

@ldelvoye
ldelvoye merged commit 87f7b02 into master Sep 9, 2026
89 of 90 checks passed
@ldelvoye
ldelvoye deleted the ldelvoye/chore/omt-remove-new-id-dual-write branch September 9, 2026 18: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.

2 participants