diff --git a/core/modules/migrate_drupal/src/NodeMigrateType.php b/core/modules/migrate_drupal/src/NodeMigrateType.php index 94ce0dfa42..54ff90e9ac 100644 --- a/core/modules/migrate_drupal/src/NodeMigrateType.php +++ b/core/modules/migrate_drupal/src/NodeMigrateType.php @@ -3,6 +3,7 @@ namespace Drupal\migrate_drupal; use Drupal\Core\Database\Connection; +use Drupal\Core\Site\Settings; /** * Provides a class to determine the type of migration. @@ -39,6 +40,11 @@ final class NodeMigrateType { * @internal */ public static function getNodeMigrateType(Connection $connection, $version) { + $migrate_node_migrate_type_classic = Settings::get('migrate_node_migrate_type_classic', FALSE); + if ($migrate_node_migrate_type_classic) { + return static::NODE_MIGRATE_TYPE_CLASSIC; + } + $migrate_type = static::NODE_MIGRATE_TYPE_COMPLETE; if ($version) { // Create the variable name, 'node_has_rows' or 'node_complete_exists' and diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 1c8dbee9e7..992c08540f 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -741,6 +741,19 @@ */ $settings['entity_update_backup'] = TRUE; +/** + * Migration node type. + * + * This is used to force the migration system to use the classic node migrations + * instead of the default complete node migrations. The migration system will + * use the classic node migration only if there are existing migrate_map tables + * for the classic node migrations and they contain data. These tables may not + * exist if you are developing custom migrations and do not want to use the + * complete node migrations. Set this to TRUE to force the use of the classic + * node migrations. + */ +$settings['migrate_node_migrate_type_classic'] = FALSE; + /** * Load local development override configuration, if available. *