Skip to content

Commit 4cc6bcc

Browse files
authored
feat(db): deprecate createCollection strict mode
NODE-2746
1 parent 3cda5c4 commit 4cc6bcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/db.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ Db.prototype.collection = function(name, options, callback) {
492492
* @param {object} [options.pkFactory] A primary key factory object for generation of custom _id keys.
493493
* @param {(ReadPreference|string)} [options.readPreference] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
494494
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
495-
* @param {boolean} [options.strict=false] Returns an error if the collection does not exist
495+
* @param {boolean} [options.strict=false] DEPRECATED: Returns an error if the collection does not exist
496496
* @param {boolean} [options.capped=false] Create a capped collection.
497497
* @param {boolean} [options.autoIndexId=true] DEPRECATED: Create an index on the _id field of the document, True by default on MongoDB 2.6 - 3.0
498498
* @param {number} [options.size] The size of the capped collection in bytes.
@@ -513,7 +513,7 @@ Db.prototype.collection = function(name, options, callback) {
513513
Db.prototype.createCollection = deprecateOptions(
514514
{
515515
name: 'Db.createCollection',
516-
deprecatedOptions: ['autoIndexId'],
516+
deprecatedOptions: ['autoIndexId', 'strict'],
517517
optionsIndex: 1
518518
},
519519
function(name, options, callback) {

0 commit comments

Comments
 (0)