-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor(model): allow optionally passing indexes to createIndexes and cleanIndexes #12280
Conversation
… exist on mongodb server re #12250
@@ -6756,6 +6755,31 @@ describe('Model', function() { | |||
); | |||
|
|||
}); | |||
xit('creates indexes only when they do not exist on the mongodb server (gh-12250)', async() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is marked as pending because this is not fixed yet, the PR was initially meant to fix the issue, but it's taking longer than anticipated. So for now let's stick to the refactoring, and I'll fix it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great so far, no concerns. Let me know when you think this is ready 👍
@vkarpov15 I remember one challenging part was understanding why What do you think? |
This refactors
diffIndexes
to smaller functions.Also, refactors
cleanIndexes
andcreateIndexes
to accept receiving optional parameters for the indexes to drop/create. This reduces the number oflistIndexes
required forsyncIndexes
to work.I'd like to merge this since it's in a functional state, then I'll work on fixing #12250 once I can dedicate more time to it.