Drupal - How to refresh new migrations in Drupal 8 migration module?

I found this worked for me

drush config-import --partial --source=modules/custom/migrate_module/config/install/


Migrations should be in the MODULENAME/migrations subdirectory. After modifying a migration config a simple drush cr suffices to apply the changes.

A config deriver will turn a migration config back into a migration plugin.

See this change record: Migrations are plugins instead of configuration entities


There is a module for that. Since normally the yml files are only loaded upon install.

This module lets you can define what module config files are automaticly imported.

https://www.drupal.org/project/config_devel

Also see this blog post: https://blog.liip.ch/archive/2016/05/04/using-the-new-drupal-8-migration-api-module.html

Developing your own Drupal 8 migrate modules and fighting caching issues

You have learned, that the whole migration mapping is now done in yaml files. But how about writing your own migration yaml files?

Unfortunately, there are some pitfalls for new Drupal 8 developers. Because of the Configuration Management Interface (https://www.drupal.org/documentation/administer/config) of Drupal 8, all yml files in the “config/install” directory are only imported when installing the module.

This is very impractical if you want to develop new configuration files. To address this, a module “Configuration Development” (https://www.drupal.org/project/config_devel) which resolves the caching issues can be installed. It is possible to import certain yml files on every request. But unfortunately drush commands are not supported yet. So we need to add all yaml files we want to import into a new section in our module.info.yml.

config_devel:
 install:
   - migrate_plus.migration.page_node
   - migrate_plus.migration.menu_item
   - migrate_plus.migration_group.liip

Then we can run the following commands after updating the yml file. This will import the new configuration file into Configuration Management Interface.

drush cdi <module_name>
drush cr

Tags:

Migration