This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
[
|
||||
{
|
||||
"createCollection": "app_user_identity",
|
||||
"validator": {
|
||||
"$jsonSchema": {
|
||||
"bsonType": "object",
|
||||
"required": ["_id", "version", "created_at", "updated_at", "issuer", "subject", "user_id"],
|
||||
"properties": {
|
||||
"_id": {
|
||||
"bsonType": "string",
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"version": {
|
||||
"bsonType": "number"
|
||||
},
|
||||
"created_at": {
|
||||
"bsonType": "string",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
},
|
||||
"updated_at": {
|
||||
"bsonType": "string",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
},
|
||||
"issuer": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"subject": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"migration_id": {
|
||||
"bsonType": ["string", "null"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"createIndex": {
|
||||
"collection": "app_user_identity",
|
||||
"keys": {
|
||||
"issuer": 1,
|
||||
"subject": 1
|
||||
},
|
||||
"name": "app_user_identity_issuer_subject_key",
|
||||
"unique": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"createIndex": {
|
||||
"collection": "app_user_identity",
|
||||
"keys": {
|
||||
"user_id": 1
|
||||
},
|
||||
"name": "app_user_identity_user_id_idx",
|
||||
"unique": false
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user