You are here

public function MigrationBase::resetStatus in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 includes/base.inc \MigrationBase::resetStatus()

Reset the status of the migration to IDLE (to be used when the status gets stuck, e.g. if a process core-dumped)

File

includes/base.inc, line 846
Defines the base class for migration processes.

Class

MigrationBase
The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…

Code

public function resetStatus() {

  // Do not change the status of an already-idle migration
  db_update('migrate_status')
    ->fields(array(
    'status' => MigrationBase::STATUS_IDLE,
  ))
    ->condition('machine_name', $this->machineName)
    ->condition('status', MigrationBase::STATUS_IDLE, '<>')
    ->execute();
}