3 ms·
Why deleted_at? We have soft_deleted as boolean which excludes data from all queries and last_updated which a particular query can use if it needs to. If over
by nottorp 9mo ago
Why deleted_at?
We have soft_deleted as boolean which excludes data from all queries and last_updated which a particular query can use if it needs to.
If over 50% of your data is soft deleted then it's more like historical data for archiving purposes and yes, you need to move it somewhere else. But then maybe you shouldn't use soft delete for it but a separate "archive" procedure?
- hapidjus 9mo agoAre you asking why we wouldn’t use 'last_updated' to store when the record was deleted? One reason is that you might want to know when it was last updated before it was deleted.