Open
Description
Right now we do not have a unique index on gh_login. Multiple users can have the same value for that column if the following sequence of events occurs:
- user A renames their account
- user B creates an account with the same name as A
- user B logs in to crates.io
- user A does not log back in to crates.io
We currently have 23 duplicate gh_login records across 72 user records. We do have cases where both users are owners of separate crates. We will need to manually figure out on a case by case basis for the existing records. We should prevent this from occurring in the future by checking to see if an existing user has the same gh_login, and changing that record if it exists.
The question is what do we change it to? We currently use gh_login as the identifier for the /users route, so we can't just blank it out and call it a day. We need some way to continue to link to that user.