prevent collectionId relation field change

This commit is contained in:
Gani Georgiev
2023-02-24 14:12:27 +02:00
parent 21b152b58c
commit f1a6a82bd3
2 changed files with 42 additions and 1 deletions

View File

@@ -291,6 +291,26 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) {
}`,
[]string{"type"},
},
{
"update failure - changing relation collection",
"users",
`{
"schema": [
{
"id": "lkeigvv3",
"name": "rel",
"type": "relation",
"options": {
"collectionId": "wzlqyes4orhoygb",
"cascadeDelete": false,
"maxSelect": 1,
"displayFields": null
}
}
]
}`,
[]string{"schema"},
},
{
"update failure - all fields",
"demo2",