mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-24 14:31:59 +00:00
use correct partial indexes on project token fields
This commit is contained in:
parent
154b03ab13
commit
bda65c0984
1 changed files with 14 additions and 2 deletions
|
@ -33,8 +33,20 @@ ProjectSchema = new Schema
|
|||
imageName : { type: String }
|
||||
track_changes : { type: Object }
|
||||
tokens :
|
||||
readOnly : { type: String, index: {unique: true} }
|
||||
readAndWrite : { type: String, index: {unique: true} }
|
||||
readOnly : {
|
||||
type: String,
|
||||
index: {
|
||||
unique: true,
|
||||
partialFilterExpression: {'tokens.readOnly': {$exists: true}}
|
||||
}
|
||||
}
|
||||
readAndWrite : {
|
||||
type: String,
|
||||
index: {
|
||||
unique: true,
|
||||
partialFilterExpression: {'tokens.readAndWrite': {$exists: true}}
|
||||
}
|
||||
}
|
||||
tokenAccessReadOnly_refs : [ type:ObjectId, ref:'User' ]
|
||||
tokenAccessReadAndWrite_refs : [ type:ObjectId, ref:'User' ]
|
||||
overleaf :
|
||||
|
|
Loading…
Reference in a new issue