3 ms·
> The concept behind soft deletion is to make deletion safer, and reversible IME, as with “updated_by” and “last_modified_at” columns, it's usually hazy audit
by dragonwriter 4y ago
> The concept behind soft deletion is to make deletion safer, and reversible
IME, as with “updated_by” and “last_modified_at” columns, it's usually hazy audit requirements, not making deletion reversible, that motivates it.
A proper history store maintained by appropriate triggers solves this, and leaves the referential integrity constraints on the base table intact. (It can also be used for reversibility if you need that.)
Views conceptually would work, but then you get bitten by all the ways that all relations are not equal in real-world RDBMSs.