Answers for "ollection.ensureIndex is deprecated. Use createIndexes instead. unique true"

11

(node:3168) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. (Use `node --trace-deprecation ...` to show where the warning was created)

mongoose.set('useCreateIndex', true);
Posted by: Guest on June-08-2020
3

(node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);
Posted by: Guest on July-06-2020

Code answers related to "ollection.ensureIndex is deprecated. Use createIndexes instead. unique true"

Code answers related to "Javascript"

Browse Popular Code Answers by Language