Add autoIndex: false option to mongoose connections.
This prevents mongoose from auto-creating missing indexes on boot.
This commit is contained in:
@@ -30,9 +30,10 @@ ProjectInviteSchema = new Schema(
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
conn = mongoose.createConnection(Settings.mongo.url, server: poolSize: Settings.mongo.poolSize || 10)
|
||||
|
||||
conn = mongoose.createConnection(Settings.mongo.url, {
|
||||
server: {poolSize: Settings.mongo.poolSize || 10},
|
||||
config: {autoIndex: false}
|
||||
})
|
||||
|
||||
ProjectInvite = conn.model('ProjectInvite', ProjectInviteSchema)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user