Re:Hidden work when launching a SaaS
by btown on Monday February 12, 2018 @03:31PM
(#16361792)
Soft-deletes are highly expensive technical debt until properly wrapped with an API. Until that happens, every developer/consumer needs to remember to check for archived=false.
One solution I’ve sometimes used is to move deleted records into a separate NoSQL database at delete-time. Keeps data around if you want to implement “see trashed/archived” later, can be migrated back in under an archived flag once you have that API, but in the meantime everyone else (including, crucially, the analytics team) can pretend that everything in the database is live. A kludge, to be sure, but sometimes a necessary one.
Re:Hidden work when launching a SaaS
by saurik on Monday February 12, 2018 @05:57PM
(#16363161)
Create a view and have everyone use the view. Name the original table something like "table_with_deleted_records" to make it stupidly clear what is going on.
One solution I’ve sometimes used is to move deleted records into a separate NoSQL database at delete-time. Keeps data around if you want to implement “see trashed/archived” later, can be migrated back in under an archived flag once you have that API, but in the meantime everyone else (including, crucially, the analytics team) can pretend that everything in the database is live. A kludge, to be sure, but sometimes a necessary one.