Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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?

I'm not at a terminal, so I can't check it out, but could you make a compound foreign key with the soft delete column and use the on update cascade? Something like `alter table stars add foreign key (repo_id, is_deleted) references repos (id, is_deleted) on update cascade;`



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: