You are here

public function MigrateUpgradeDrushRunner::configure in Migrate Upgrade 8

Same name and namespace in other branches
  1. 8.3 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::configure()
  2. 8.2 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::configure()

From the provided source information, instantiate the appropriate migrations in the active configuration.

Throws

\Exception

File

src/MigrateUpgradeDrushRunner.php, line 41
Contains \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner.

Class

MigrateUpgradeDrushRunner

Namespace

Drupal\migrate_upgrade

Code

public function configure() {
  $db_url = drush_get_option('legacy-db-url');
  $db_spec = drush_convert_db_from_db_url($db_url);
  $db_prefix = drush_get_option('legacy-db-prefix');
  $db_spec['prefix'] = $db_prefix;
  $migration_templates = $this
    ->getMigrationTemplates($db_spec, drush_get_option('legacy-root'));
  $this->migrationList = $this
    ->createMigrations($migration_templates);
}