News for hackers. Stuff that matters.
Re:Soft deletion probably isn't worth it by dragonwriter on Tuesday July 19, 2022 @06:33PM (#32158861)
> This is one gripe I have with soft-deletion. Since I can no longer rely on ON DELETE CASCADE relationships

If you use soft deletes on all tables, you can also cascade them as long as you either cascade updates to the real keys as well, or prevent such updates, by having a deleted flag column on each table, including it in a unique constraint with the actual key column(s), and including it in the foreign key.

There are no comments on this comment yet.