use correct partial indexes on project token fields
This commit is contained in:
@@ -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 :
|
||||
|
||||
Reference in New Issue
Block a user