If the Migrate module is disabled (but not uninstalled), then when you go to run updates they fail on migrate_update_7008() with:

Fatal error: Call to undefined function migrate_migrations() 

The usual fix in these cases is just to add a drupal_load('module', 'migrate') at the top of the update function to ensure the module's API is available before using it. However, I'm not sure that will actually make things work correctly here. The migrate_migrations() function does a lot of loading of classes and calling their methods, and if the module (or other migrate-related modules) is disabled those classes might not be available so perhaps the update function would be a no-op anyway?

Another possibility is for the update function to throw a DrupalUpdateException so it fails gracefully, and use that to inform them that they must enable the Migrate module in order to run its remaining updates.

I don't know this module well enough to decide which option is best here.

Comments

mikeryan’s picture

Status: Active » Fixed

We have to load all the migration classes to be able to identify all the tables reliably. So, going with option 2, throwing the exception...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

neuquen’s picture

I am getting the same exact error, except this time with migrate_update_7203(). Is it possible to enable migrate through an install hook? I'd like to enable it automatically. So far I have only had success enabling this with drush manually.