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

Adding unique name index on groups collection #451

Closed
wants to merge 2 commits into from

Conversation

shailee-m
Copy link
Member

closes #399

A unique group name can be ensured using mongodb index, but if there are pre-existing duplicate names a migration may be needed before creating the index.

Proposed migration:

  • To find all sets of duplicate groups names,
  • For each set use the first groupID in the set to replace references (of other groupIDs of the set) in permissions and homes collection.
  • Lastly, except for the group with the first groupID, drop the rest from the groups collection.

@shailee-m shailee-m requested a review from brylie June 25, 2019 16:22
brylie
brylie previously approved these changes Jun 25, 2019
@brylie
Copy link
Member

brylie commented Jul 3, 2019

I'm going to leave this one open for a bit, to see how it would work in a multi-tenancy situation.

@brylie
Copy link
Member

brylie commented Oct 6, 2019

I think we want to leave this working as is, since we are going towards multi-tenancy. I.e. different tenants might have duplicate group names, without knowing about each other.

@brylie brylie closed this May 31, 2020
@brylie brylie deleted the 399-duplicate-group-name branch September 15, 2020 15:04
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.

[Groups]: Duplicate group name is created
2 participants