You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aside from the migration guide, which says that autoCreate now defaults to true except in some secondary cases, the Schema Options documentation has not been updated.
Unfortunately, createCollection() cannot change an existing collection. For example, if you add capped: 1024 to your schema and the existing collection is not capped, createCollection() will throw an error. Generally, autoCreate should be false for production environments.
Unlike autoIndex, autoCreate is false by default. You can change this default by setting mongoose.set('autoCreate', true);
From:
So documentation should mirror that case then and be not so strict on not using autoCreate in prod :)
Aside from the migration guide, which says that autoCreate now defaults to true except in some secondary cases, the Schema Options documentation has not been updated.
https://mongoosejs.com/docs/guide.html#autoCreate
From:
Originally posted by @deser in #8814 (comment)
The text was updated successfully, but these errors were encountered: