src/Tasks.php
public function migrateCleanup($opts = ['migrations' => '']) {
    if ($opts['migrations'] && ($this->migrationSourceFolder() || $this->usesMigrationPlugins)) {
      $migrations = explode(',', $opts['migrations']);
      $project_properties = $this->getProjectProperties();

      foreach ($migrations as $migration) {
        $this->taskExec('drush mrs ' . $migration)
          ->dir($project_properties['web_root'])
          ->run();
      }
    }
    if ($this->migrationSourceFolder()) {
      $this->taskExec('drush mr --all && drush cim --partial --source=' . $this->migrationSourceFolder() . ' -y && drush ms')
        ->dir($project_properties['web_root'])
        ->run();
    }
    else if ($this->usesMigrationPlugins) {
      $this->taskExec('drush cr && drush mr --all && drush ms')
        ->dir($project_properties['web_root'])
        ->run();
    }
    else {
      $this->say('No migration sources configured.');
      $this->say('To use this command, you must either return a folder path from the migrationSourceFolder() method or set $usesMigrationPlugins to TRUE in your project\'s RoboFile.php.');
      return FALSE;
    }
  }
public function migrateCleanup($opts = ['migrations' => '']) {
    if ($opts['migrations'] && ($this->migrationSourceFolder() || $this->usesMigrationPlugins)) {
      $migrations = explode(',', $opts['migrations']);
      $project_properties = $this->getProjectProperties();

      foreach ($migrations as $migration) {
        $this->taskExec('drush mrs ' . $migration)
          ->dir($project_properties['web_root'])
          ->run();
      }
    }
    if ($this->migrationSourceFolder()) {
      $this->taskExec('drush mr --all && drush cim --partial --source=' . $this->migrationSourceFolder() . ' -y && drush ms')
        ->dir($project_properties['web_root'])
        ->run();
    }
    else if ($this->usesMigrationPlugins) {
      $this->taskExec('drush cr && drush mr --all && drush ms')
        ->dir($project_properties['web_root'])
        ->run();
    }
    else {
      $this->say('No migration sources configured.');
      $this->say('To use this command, you must either return a folder path from the migrationSourceFolder() method or set $usesMigrationPlugins to TRUE in your project\'s RoboFile.php.');
      return FALSE;
    }
  }
public function migrateCleanup ( $ opts = [ 'migrations' => '' ] ) { if ( $ opts [ 'migrations' ] && ( $ this -> migrationSourceFolder ( ) || $ this -> usesMigrationPlugins ) ) { $ migrations = explode ( ',' , $ opts [ 'migrations' ] ) ; $ project_properties = $ this -> getProjectProperties ( ) ; foreach ( $ migrations as $ migration ) { $ this -> taskExec ( 'drush mrs ' . $ migration ) -> dir ( $ project_properties [ 'web_root' ] ) -> run ( ) ; } } if ( $ this -> migrationSourceFolder ( ) ) { $ this -> taskExec ( 'drush mr --all && drush cim --partial --source=' . $ this -> migrationSourceFolder ( ) . ' -y && drush ms' ) -> dir ( $ project_properties [ 'web_root' ] ) -> run ( ) ; } else if ( $ this -> usesMigrationPlugins ) { $ this -> taskExec ( 'drush cr && drush mr --all && drush ms' ) -> dir ( $ project_properties [ 'web_root' ] ) -> run ( ) ; } else { $ this -> say ( 'No migration sources configured.' ) ; $ this -> say ( 'To use this command, you must either return a folder path from the migrationSourceFolder() method or set $usesMigrationPlugins to TRUE in your project\'s RoboFile.php.' ) ; return FALSE ; } }
Cleanup migrations.

@option string migrations
Optional list of migrations to reset, separated by commmas.
Cleanup migrations .