Avoiding the soft delete anti-pattern
Programmers hate deleting things; we’ve all felt that feeling in the pit our stomach when we realise
that thing we deleted was really deleted, and on the other hand the security of deleting some
unused code, safe in the knowledge that it’s still really there in version control. In the sphere of
databases, this terror of deleting things leads people to advocate soft deletion: instead of
really deleting a record, you add a field which marks the record as deleted, and you treat any
record marked in that way as if it were deleted. This is generally a bad idea, and there are a
number of better ways of ensuring access to old data.
https://www.cultured.systems/2024/04/24/Soft-delete