Hacker News new | ask | show | jobs
by waldrews 794 days ago
How would you approach audit trail/soft delete scenarios?
1 comments

Since it’s really application specific (what rows should be soft deleted, is recovery possible…), you probably want to model these like any other state. With Convex you can do things like schedule a deletion mutation 30 days from now, or run a cron job that cleans up data out of retention.

Is this what you had in mind?

I guess I'm just wishing for an insta-backend with a database layer that's auditable/temporal by default (like Datomic). Guess that's orthogonal to the problems you're solving.
This is kind of how Convex works under the hood, and so we might add more temporal/auditing functionality in the future (like a time-traveling debugger).

You could also implement this on top of Convex, if it makes sense for your write volume.