Ask HN: Best practices – Should I ever actually delete data?
Is it ever a good idea to actually delete something as a response to user-behavior? Lately I've been defaulting to adding an "is_active" attribute/column/property to the data I store. When a user tries to delete something, I just switch that boolean from true to false.
The upside is I never actually delete anything (and can retrieve it if the customer freaks out because they deleted something on accident), the downside is just that as well...growing datasets that are not actually doing any good, except for being able to save-the-day in very rare customer-support contexts. And the downside of having to include "is_active == true" in most queries I send to retrieve data.
How do you guys handle this?
I was thinking of creating worker-scripts to regularly purge the database of non-active data (dump it to a flat file and send it all to Amazon Glacier or something)