Drush provides a feature called sql-sanitize that helps to delete data that shouldn't leave a production environment.
I think all entityform submissions should be deleted when drush sql-sanitize
runs, similar to what webform is doing.
I will implement this for a project I'm working on, let me know if you would accept a patch that does that.
Comments
Comment #2
Pere OrgaComment #3
joelpittetYes that sounds handy
Comment #4
Pere OrgaUnfortunately I haven't found a way that works across all supported database servers (
drush_sql_register_post_sync_op
expects database queries). The main problem is that I don't think there is a proper way to get all relevant database tables (field and revision tables) of all entityforms. And ideally, data in fields shared by other bundles (non-entityform) should not be wiped out.I've found drush_shrinkdb doing something similar just for MySQL: http://cgit.drupalcode.org/drush_shrinkdb/tree/src/Query/EntityType.php
At the end I think I'm going to run manually something like this after sql-sanitize: (terribly slow, by the way)
Comment #5
joelpittetSeems like you're on the right path. Keeping the status active. Postponed is usually postponed on some other actionable issue so there is a forseeable end.
Comment #6
Pere OrgaFaster version of the code above, and in a drush command:
IMHO the best would be to add an option to sanitize data in Drush without using SQL. Perhaps I'll create an issue in Drush's issue queue for that.