With a database filled with several customers’ datasets, I thought it
would be a nice feature of my app’s backend interface to be able to
extract (and optionally delete) the data from a single customer. It
would then also be nice to rebuild that data from the stored info.
What’s a good way to do this efficiently?
If all the “:dependent => true” are setup properly on associations
within models, a single “.destroy()” called on the customer will yank
all the data. Is there a way to do something else with those rows?
i.e. sqldump of some sort?
I thought of adding a “before_destroy” hook, checking a global
“archive_on_destroy” or something and dumping those rows out. Is this a
Anyway, I’m just shooting in the dark now to brainstorm ways of
performing this archival and retrieval. Any ideas would be greatly