Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop unique constraint on handles #411

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

whyrusleeping
Copy link
Collaborator

When users change their handles, that change doesnt necessarily propagate through the whole world consistently. The big issue this causes for us is if a user changes their handle from X to Y, and we arent able to validate it, we dont update our accounting of that change. Then if a new user creates an account with handle X, we fail to correctly initialize that user because of the uniqueness constraint.

I think I'll have to manually do these migrations, i doubt gorm will correctly swap the indexes from unique to not-unique.

I read through all the code referencing unique conflicts and handle setting and I believe this should work just fine.

Copy link
Collaborator

@ericvolp12 ericvolp12 left a comment

Choose a reason for hiding this comment

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

LGTM

@whyrusleeping whyrusleeping merged commit 227cab3 into main Nov 2, 2023
6 checks passed
@whyrusleeping whyrusleeping deleted the fix/handle-not-unique branch November 2, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants