D6-D8 migration: How did we find missing migrations?

We were working on D6 to D8 migration projects where we were migrating the revised database of D6 site to D8 site every other month.

We started with full migration initially and then with partial migration subsequently. This was working perfectly fine. We were using drush commands to do the migration.

But recently when we got the latest D6 database, we were no longer seeing term node migration entities (d6_term_node__1, d6_term_node__2 etc.) with drush migrate-status command in D8. Although migration worked fine for all other items but as we were not seeing term node relationship entities (d6_term_node__1) so latest migrated content doesn't had terms associated with it.

We tried switching to old D6 database but that didn't help. We tried using --configure-only option with drush command to regenerate the migrations but even that didn't help,

drush migrate-upgrade --configure-only --legacy-db-url=mysql://drupaluser:@127.0.0.1:33067/d6 --legacy-root=http://d6.local:8083

We also checked "config" table but those migrations were not present there,

SELECT * FROM `config` WHERE `name` LIKE '%d6_term_node%';

We were almost stuck and not sure what to do.

As were using revision control and code management system (GIT) so after the first migrate-upgrade, we exported the configuration (Configuration Synchronization - full export) into git repository. At this point, d6_term_node_* migrations were present.

So, to recover the missing migrations, we imported those files (migrate.migration.d6_term_node__1.yml, migrate.migration.d6_term_node__2.yml etc.) one by one from Configuration synchronization->Import->Single item (/admin/config/development/configuration/single/import),


After the import above, we could see those missing migration using "drush ms" command and imported those missing migrations successfully.
drush migrate-import d6_term_node__1
drush migrate-import d6_term_node__2

You can find more information on how to execute Drupal upgrade using Drush commands here - https://www.drupal.org/node/2350651.

Comments

Popular posts from this blog

Simple Meditation

Custom MySQL Database to Drupal 8 Migration