3

When I develop a site in Drupal, I test a couple of modules to see what best suits my needs. The problem is that, if it is a large site, I find myself with a lot of modules and patches (disabled / uninstalled), which still exist in the modules folder. There are a lot of modules that don't have an uninstall feature; the result is that I get many unused tables in the database, and many used files to delete.

Is there a better solution, or way to proceed for testing modules?

1
  • If a module doesn't clean up after itself, that's a bug. Please file an issue in the appropriate issue queue. Commented Mar 30, 2011 at 5:05

2 Answers 2

3

You can of course create a test site to experiment with certain modules and patches before adding them to the real site.

Version control is also really helpful, because it allows you to revert to a previous version of your code. However you need to keep in mind that your database is not under version control, so you need to take a snapshot of that as well to do a proper rollback.

A more advanced solution is to use drush make and the features module. The features module allows you to store a lot of configuration in code. When combined with drush make, it allows you to roll out a fresh copy of your code again and again.

0
1

You can use the Schema module to compare the schemas defined by your currently installed modules to what is actually in your database.

With this module you will be able to identify:

  1. Extras: Tables that are not present in the schema. This indicates previously installed modules that are disabled but not un-installed or modules that do not use the Schema API.
  2. Mismatches: Tables for which the schema and database are different.
  3. Missing: Tables in the schema that are not present in the database.

Please note that Schema requires MySQL 5.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.