Created
January 29, 2018 07:23
-
-
Save steffenr/865692d54862bd75a3113fa8af059dd2 to your computer and use it in GitHub Desktop.
[Drupal 8] Override id map with custom plugin for migrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_migration_plugins_alter(). | |
*/ | |
function my_module_migration_plugins_alter(array &$migrations) { | |
foreach ($migrations as $id => $configuration) { | |
if (!empty($migrations[$id]['idMap'])) { | |
// Do not override existing values. | |
continue; | |
} | |
// Override id map for each migration. | |
$migrations[$id]['idMap'] = [ | |
'plugin' => 'sql_large_key', | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment