mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
035e0c1213
This prevents mongoose from auto-creating missing indexes on boot.
20 lines
599 B
CoffeeScript
20 lines
599 B
CoffeeScript
Settings = require "settings-sharelatex"
|
|
mongoose = require('mongoose')
|
|
Schema = mongoose.Schema
|
|
ObjectId = Schema.ObjectId
|
|
|
|
UserStubSchema = new Schema
|
|
email : { type : String, default : '' }
|
|
first_name : { type : String, default : '' }
|
|
last_name : { type : String, default : '' }
|
|
overleaf : { id: { type: Number } }
|
|
|
|
conn = mongoose.createConnection(Settings.mongo.url, {
|
|
server: {poolSize: Settings.mongo.poolSize || 10},
|
|
config: {autoIndex: false}
|
|
})
|
|
|
|
UserStub = conn.model('UserStub', UserStubSchema)
|
|
|
|
model = mongoose.model 'UserStub', UserStubSchema
|
|
exports.UserStub = UserStub
|