Skip to content

Instantly share code, notes, and snippets.

@steffenr
Created January 29, 2018 07:23
Show Gist options
  • Save steffenr/865692d54862bd75a3113fa8af059dd2 to your computer and use it in GitHub Desktop.
Save steffenr/865692d54862bd75a3113fa8af059dd2 to your computer and use it in GitHub Desktop.

Revisions

  1. steffenr created this gist Jan 29, 2018.
    17 changes: 17 additions & 0 deletions id_map_custom.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <?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',
    ];
    }
    }