db.person.getIndexes()
db.person.createIndex( { "personId": 1 }, { unique: true } )
Index already exists with different options
db.person.dropIndex("personId_1")
db.person.createIndex( { "personId": 1 }, { unique: true } )
could not create unique index: person index: personId_1
Created
November 18, 2021 15:27
-
-
Save udhos/68cac4d31e9937432dcd9ab7efccc9ae to your computer and use it in GitHub Desktop.
mongodb_index.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment