Drush dbclean is a drush extension that optimizes drupal's database tables.

It only works on mysql and MyISAM tables, so it's only really relevant for drupal 6. It is similar to http://drupal.org/project/db_maintenance but differs in that this is only a drush extension. This is handy because it does not make any drupal installation bigger and it can be run for many sites on the same server with only 1 installation.

Project page: http://drupal.org/sandbox/FreekyMage/1349184
Git: git clone --branch master FreekyMage@git.drupal.org:sandbox/FreekyMage/1349184.git drush_dbclean
Tested with drush 4.5

Comments

ethanw’s picture

Status: Needs review » Needs work

This definitely looks like it would be a helpful Drush command, thanks for contributing! Thanks also for the link to the similar module, it does make evaluation much easier.

That said, this does look like it would be best to patch the existing db_maintenance module with this functionality, since the code executed is virtually identical and the db_maintenance module also includes Drupal 7 and Postgres support. If included in that module it could still be put in the ~/.drush directory to gain the advantages you mention in terms of Drupal installation size and multisite functionality, but would receive support and be usable by the existing user base of that module.

Alternately, this could be a good patch to Drush's core sql functions.

Have you inquired with the maintainers of those projects regarding including this functionality?

Also, you have some coding standards issues, most importantly in the misisng fields of the .info file. Not as big an issue due to the drush-specific nature of the code, but important in terms of standardization and completeness of the module's code.

See http://ventral.org/pareview/httpgitdrupalorgsandboxfreekymage1349184git for the output of an initial automated review.

Again, I certainly appreciate the usefulness of this module's functionality, and look forward to it being available one way or another. It just seems the above routes should be investigated first prior to creating a new module for it.

FreekyMage’s picture

Thanks for the reply and the ventral site link, it's pretty usefull.

I'm cleaning up the code together with someone from work and will create an issue on drush and the db_maintance module to ask what they think about this. I had ignored this for now since this is a personal thing that people suggested I make public.

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

avpaderno’s picture

Component: other » drush
Issue summary: View changes