Last active
April 26, 2021 09:30
-
-
Save hirenrojasara/9cede8ff21197d614005 to your computer and use it in GitHub Desktop.
Drop index from mongoose model programatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you are having multiple mongoose connection, please iterate it and get the reference. | |
mongoose.connections[0].collections("collectionname").dropIndex("propertyName",callback) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment