News for hackers. Stuff that matters.
Re:Soft deletion probably isn't worth it by tomschlick on Tuesday July 19, 2022 @09:10PM (#32160061)
The biggest one is to use a timestamp instead of a boolean. For instance Laravel used `deleted_at` as the field name with the type of TIMESTAMP (for mysql at least).

This allows you to do a `select * from users where deleted_at is null` to get the active records, but also know when the user was deleted if you need to audit / rollback.

There are no comments on this comment yet.