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

The `deleted_at` column approach to soft deletion has enough downsides that I would choose to just move "deleted" records into a different table.

Having a separate table for deleted records means that

- FK references to the main table will just work

- the main table can be kept clean.

- it avoids the class of problems where a user or the application treats soft-deleted records as real records, because they weren't aware of the `deleted_at` column.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: