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

Make user.email field unique in production database #1065

Closed
4 of 5 tasks
drubgrubby opened this issue Feb 15, 2022 · 1 comment
Closed
4 of 5 tasks

Make user.email field unique in production database #1065

drubgrubby opened this issue Feb 15, 2022 · 1 comment
Assignees
Labels
pbv: 0.3 Issues that were on VRMS v0.3 Development role: Database size: 0.5pt Can be done in 2-3 hours or less

Comments

@drubgrubby
Copy link
Member

drubgrubby commented Feb 15, 2022

Overview

The user.email field in the Production database is not a unique field, which allows duplicate accounts to be created. (That is, two accounts with identical email addresses).

Action Items

  • Make like 17 backups of the production database. (One will probably be enough, but you get my point I hope). \

Option 1 (if it's not too much of a pain)

  • Append something to the duplicate users' email addresses so that they are now all unique, but only one is a functional email address. ex. g@google.com, g@google.com.dup1, g@google.com.dup2, etc

Option 2

  • Make a copy of the users table (users.copy). This will allow us to go back and look at the data from duplicate users later if we need.
  • Remove duplicate users (that is, users with the same email address) from the database.

Then...

  • Make that field unique

Resources/Instructions

Production database login:
mongodb+srv://testuser2:Riy4gVoo3RYzLJEB@cluster0-haogu.mongodb.net/db?retryWrites=true&w=majority

@FoxShaunR
Copy link
Member

Created a backup of the users table "users_with_dupes", deleted all duplicates, and created a unique index based on the email field.

@jbubar jbubar added size: 0.5pt Can be done in 2-3 hours or less and removed x-size: 1pt labels Jul 13, 2023
@JackHaeg JackHaeg added the pbv: 0.3 Issues that were on VRMS v0.3 Development label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pbv: 0.3 Issues that were on VRMS v0.3 Development role: Database size: 0.5pt Can be done in 2-3 hours or less
Projects
Development

No branches or pull requests

4 participants