Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonathanfranks/10544cd4e1e6afe0afb9f1656c642d9b to your computer and use it in GitHub Desktop.
Save jonathanfranks/10544cd4e1e6afe0afb9f1656c642d9b to your computer and use it in GitHub Desktop.
Run migrate import with update option
$migration_id = 'xxx';
/** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
$migration = \Drupal::service('plugin.manager.migration')
->createInstance($migration_id);
$migration->getIdMap()->prepareUpdate();
$executable = new MigrateExecutable($migration, new MigrateMessage());
$executable->import();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment