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

There is another solution I use all the time: move deleted records to their own table. You probably don't need to do this for all tables. It allows you to not pepper your codebase with where clauses or statuses, everything works as intended, and you can easily restore records deleted by mistake, which is the original intent anyways. You can easily set this up by using a trigger at the database level in almost every database, that just works.


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

Search: