Hello!,
I have a trigger set to run when a player document is deleted. The purpose is so that I can also remove a file (a profile image) from a cloud server when the player is deleted. However, the link to that file is stored in the player document so I need access to it during the delete function.
After some research, I tried to enable Document Preimage in the delete trigger but I get this error:
sync incompatible role change not allowed: service contains a sync incompatible role “readOwnWriteOwn” that was previously compatible
The rules for that collection are fairly simple:
"roles": [
{
"name": "readOwnWriteOwn",
"apply_when": {},
"document_filters": {
"read": {
"owner_id": {
"%stringToOid": "%%user.id"
}
},
"write": {
"owner_id": {
"%stringToOid": "%%user.id"
}
}
},
"insert": true,
"delete": true,
"search": true,
"read": true,
"write": true
}
Note that “owner_id” is a queryable field and all device sync stuff works fine with all of my collections. That is, until I try to change the delete trigger to include a document preimage. I’ve scoured a lot of the docs and I’m just not seeing why that change is not sync compatible.
Thanks for any tips!