Chris 2pha Brown. Drupal developer Brisbane Australia

Chris Brown

Drupal, Javascript, Three.js, 3D

website blog
image for Drupal Migrate, Don't forget to de register your classes

Drupal Migrate, Don't forget to de register your classes

Often times when writing a module to migrate content leveraging the Migrate module you will find yourself disabling and re enabling your module as you add classes to it.
When you do this you might find that you get errors about classes not being found or that your migrations are still being displayed in the interface even though your module is disabled (when using a class from another module such as d2d_migrate).
To get around this, make sure you de register your migration classes in a HOOK_disable() function in your module.

function MYMODULE_disable() {
  Migration::deregisterMigration('my_role_migration');
  Migration::deregisterMigration('my_user_migration');
}

Add a comment

<b>, <i> and <code> tags are allowed.