News for hackers. Stuff that matters.
Re:Soft deletion probably isn't worth it by wvenable on Tuesday July 19, 2022 @04:47PM (#32157739)
Often you don't have to rely on ON DELETE CASCADE relationships. Because you are never deleting anything, you will never have any orphaned records. If you don't want to see say Invoices for a deleted Customer then that's just another filter feature.

Mostly I use soft-delete because for auditing requirements we pretty much can't remove anything but also because nothing ever truly goes away. If we have an Invoice or Order then, from our perspective, we must have those forever even if the corresponding client is deleted and can never place another one.

Re:Soft deletion probably isn't worth it by nkozyra on Tuesday July 19, 2022 @06:25PM (#32158789)
> Often you don't have to rely on ON DELETE CASCADE relationships. Because you are never deleting anything, you will never have any orphaned records

Exactly. Unless you're doing something silly like adding deleted at to bridge tables ... which, you probably don't need even in 1:many.