|
|
|
|
|
by philprx
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. This way you can watch post mortem, restore etc... AND it's not soft delete since the data is really gone from the production table, therefore no query tweaking Only thing: you need to really delete when GDPR related deletion is requested. |
|
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.