0

After I enabled the Drupal Migrate module in Drupal 10, every time I do a drush ms I get a page of errors about Drupal 7 migrations like the following one.

[error] Could not retrieve source count from d6_filter_format: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'PRODUCTION_content_shared.filter_formats' doesn't exist: SELECT COUNT(*) AS "expression"

Is there a way to disable migrations by migration_tags (all the Drupal 6 migrations are tagged "Drupal 6") or if necessary by ID?

1
  • I know I can do drush ms --tag my_tag or drush ms --group my_group which will avoid the Drupal 6 and Drupal 7 migrations and errors. Still would be nice to disable the D6 migrations however so I can just drush ms.
    – Naidim
    Commented Jul 13, 2023 at 23:03

1 Answer 1

1

Use hook_migrations_plugins_alter.

For example:

/**
 * Implements hook_migration_plugins_alter().
 */
function my_module_migration_plugins_alter(array &$migrations) {
  $migrations = array_filter($migrations, fn(array $m) => $m['provider'] == 'my_module');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.