Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Smart Migrate CLI (for Drupal)

No security coverage Under active development

This command-line tool improves Drush's migration import functionality by fixing several issues. It runs migrations as the administrator user, automatically determines the correct execution order, and re-instantiates migrations during the process to ensure up-to-date configurations. This prevents potential data corruption and ensures migrations are handled properly.

Smart Migrate CLI overrides Drush ^11 migrate:import command to fix the tiny-tiny nits which slightly degrade its DX:

  1. Drush ^11 executes migration operations with user 0. SMC's migrate:import uses uid 1.

  2. Drush ^11 migrate import command does not build the optimal execution order - meaning that we usually have to use the --execute-dependencies arg. No need for that - we just have to call MigrationManager::buildDependencyMigrations() and keep the order it returns.

  3. Migrate Drupal UI's MigrateUpgradeImportBatch executes migrations with batch - meaning that every new import operation is started in a new request. This ensures that new fields created by a previously executed migration are reflected in (plugin, entity type, field etc) managers.

    Unfortunately, Drush ^11 migrate command instantiates migrations only at the beginning of its import command. Smart Migrate CLI re-instantiates them right before import, ensuring that most of services injected in source or destination plugin instances are up-to-date.

  4. Because of the above, entity caches might be obsolete when we are about to start importing e.g. content entities.

  5. Drush ^11 is unaware of classic or complete node migrations. It does not check what is the configured node migration strategy - it just executes both classic and complete migrations - which results in data corruption (or misleading error messages).

  6. Drush ^11 is unaware of follow-up migrations. It seems it does not know they exist - but it does not handles them the right way for sure.

Ask your assistant about Smart Migrate CLI (for Drupal)

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Jan 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha14 Pre-release 9–11 Jun 30, 2025
1.0.0-alpha13 Pre-release 9–10 Sep 27, 2023
1.0.0-alpha12 Pre-release 9–10 Feb 10, 2023
1.0.0-alpha11 Pre-release 9–10 Jan 20, 2023
1.0.0-alpha10 Pre-release 9–10 Jan 19, 2023
1.0.0-alpha9 Pre-release 9–10 Jan 16, 2023