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.
Couldn't you just use an on delete trigger for this? I have no experience one the subject however