Instead of deleting events, tombstone them. This allows for easier audit and recovery after accidental deletion.
To implement:
- Add
deleted_at = DateTimeField() to the Event(Document) definition.
GET /events queries on (untested) deleted_at: None.
DELETE /events/{id} sets event.deleted_at to the current timestamp.
The use of a timestamp allows us to garbage collect (truly delete) tombstoned events at a later date, although this issue calls for neither a cookbook recipe nor code to do this.
Instead of deleting events, tombstone them. This allows for easier audit and recovery after accidental deletion.
To implement:
deleted_at = DateTimeField()to theEvent(Document)definition.GET /eventsqueries on (untested)deleted_at: None.DELETE /events/{id}setsevent.deleted_atto the current timestamp.The use of a timestamp allows us to garbage collect (truly delete) tombstoned events at a later date, although this issue calls for neither a cookbook recipe nor code to do this.