Skip to content

fix(merge): Handle unique constraint conflicts in merge_users_for_model_in_org#111710

Closed
billyvg wants to merge 1 commit intomasterfrom
billy/fix-merge-users-unique-constraints
Closed

fix(merge): Handle unique constraint conflicts in merge_users_for_model_in_org#111710
billyvg wants to merge 1 commit intomasterfrom
billy/fix-merge-users-unique-constraints

Conversation

@billyvg
Copy link
Copy Markdown
Member

@billyvg billyvg commented Mar 27, 2026

Before updating user references during a user merge, delete from_user rows
that would violate unique constraints by conflicting with existing to_user
rows. Uses Exists/OuterRef subqueries to generically detect conflicts for
any model, including conditional UniqueConstraints.

Fixes SENTRY-5HVP

…el_in_org

Before updating user references during a user merge, delete from_user rows
that would violate unique constraints by conflicting with existing to_user
rows. Uses Exists/OuterRef subqueries to generically detect conflicts for
any model, including conditional UniqueConstraints.

Fixes SENTRY-5HVP
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 27, 2026
@billyvg billyvg closed this Mar 27, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant