Hacker News new | ask | show | jobs
by FriedrichN 1860 days ago
>On this case, one way is to make a past_ or deleted_$tablename where you insert the deleted row before deleting it from production table.

The problem with this that it gets really cumbersome if you have a complex system of tables that depend on the main table, you'll end up having to make deleted/archived versions of all those tables. In that case it's easier to have a deleted/archived flag in the main table.