You are here

function drush_migrate_deregister_migration in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate.drush.inc \drush_migrate_deregister_migration()

Given a migration machine name, remove its tracking from the database.

Parameters

$machine_name:

1 call to drush_migrate_deregister_migration()
drush_migrate_deregister in ./migrate.drush.inc
Deregister a given migration, or all orphaned migrations. Note that the migration might no longer "exist" (the class implementation might be gone), so we can't count on being able to instantiate it, or use migrate_migrations().

File

./migrate.drush.inc, line 1258
Drush support for the migrate module

Code

function drush_migrate_deregister_migration($machine_name) {

  // The class is gone, so we'll manually clear migrate_status, and make
  // the default assumptions about the map/message tables.
  dbtng_drop_table('migrate_map_' . $machine_name);
  dbtng_drop_table('migrate_message_' . $machine_name);
  db_delete('migrate_status')
    ->condition('machine_name', $machine_name)
    ->execute();
}