News for hackers. Stuff that matters.
Re:We lost 54k GitHub stars by 411111111111111 on Friday April 15, 2022 @01:23AM (#31036827)
> I assume that the cascading done on GitHub would be done on a FK constraint, but I'm not really sure how you'd do a "cascading soft delete" without making some kind of manual cascading logic?

Couldn't you just use an on delete trigger for this? I have no experience one the subject however

Re:We lost 54k GitHub stars by nine_k on Friday April 15, 2022 @02:23AM (#31037127)
An ON UPDATE trigger for the is_deleted column would do.

Some databases also support INSTEAD OF triggers.

Re:We lost 54k GitHub stars by vaishnavsm on Sunday April 17, 2022 @08:50PM (#31066108)
Doesn't ON UPDATE only work for foreign keys? As far as I know, it's used to update the foreign key itself, and not values based on relationships.