3 ms·
soft deletes clutter up the table in question. They lead to bugs in code when people forget to exclude the soft deletes WHERE clause. It also can complicates pa
by berkle4455 4y ago
soft deletes clutter up the table in question. They lead to bugs in code when people forget to exclude the soft deletes WHERE clause. It also can complicates patterns: user deletes account, a month later the same user wants to create a new account but the soft delete row prevents creation due to duplicate email address.
This seems like a clever solution that simply deletes rows but provides a cumbersome mechanism to see history of delete data if they need it.
- ttfkam 4y agoNot too terribly cumbersome when you have jsonb_populate_record in Postgres. https://www.postgresql.org/docs/current/functions-json.html https://www.postgresql.org/docs/current/functions-json.html