Add overleaf id to the Subscription (team) schema
@@ -18,6 +18,12 @@ SubscriptionSchema = new Schema
downgraded: Boolean
planCode: String
allowed: {type: Boolean, default: true}
+ overleaf:
+ id:
+ type: Number
+ index:
+ unique: true,
+ partialFilterExpression: {'overleaf.id': {$exists: true}}
SubscriptionSchema.statics.findAndModify = (query, update, callback)->