I have a couple of collections that have
history_days set to
null in order to maintain a document history that is used by our app. I was about to implement soft delete (or “trash”) functionality for those collection but then I realised that
Delete actually merely adds a “delete” event to the collection/document history.
In theory it means that to get all “deleted” documents I need to get all “delete” events for the collection. And to restore the document I could delete the “delete” event.
A couple of things that came to mind though:
- Does this mean that nothing is ever actually deleted from a collection that has
- Is this a sensible approach of a “soft-delete” like functionality?
- Is there actually a way to get a list of events of a particular type? I’d assume it’s not trivial as you can’t really create an index on events
- Am I missing something?