4 ms·
How would you approach audit trail/soft delete scenarios?
by waldrews 2y ago
How would you approach audit trail/soft delete scenarios?
- xixixao 2y agoSince 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?
- waldrews 2y agoI 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.
- xixixao 2y agoThis 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.