Let me provide a scenario:
I have a document with _id: 'doc-123'
. I delete it by calling db.put(doc)
with _deleted: true
.
On a separate device, I create 1 or more new revisions of doc-123
, but I never delete that document.
When they sync and a conflict occurs, I need a guarantee that the _deleted: true
revision will win.
By PouchDB (and perhaps CouchDB as well?) conflict resolution algorithms, if an eventual conflict does occur between this deleted document and a new revision(s) of that document (but not deleted), is it possible to guarantee that the deleted document revision will always be the winning one?
I want to ensure the case of a conflict does not result in document resurrection.
Is this behavior by default or do I need to write conflict resolution code for this case?
I read the PouchDB conflicts document and didn't see anything mentioning this.