Migrate orphans

Categories

Component ID

2873105

Component name

Migrate orphans

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module provides a Drush command to purge migrate elements that have been removed from the source.

This code is inspired by the post: https://www.drupal.org/node/1416672

Why is it a sandbox? There is an initiative to integrate it into core 8.x https://www.drupal.org/node/2809433

The module is available at D7 & D8

$ drush migrate-orphans-purge MyMigration --dry-run
Total migrated: 113
Total orphans: 12
Orphans list: 1354523469162,1354526578828,1354526907757,1354526919489,1354527092525,1354527101948,1354527169807,1354527176516,1354531723976,1354531755583,1354532867166,1354539100274

$ drush migrate-orphans-purge MyMigration
Total migrated: 113
Total orphans: 12
Orphans list: 1354523469162,1354526578828,1354526907757,1354526919489,1354527092525,1354527101948,1354527169807,1354527176516,1354531723976,1354531755583,1354532867166,1354539100274
All orphan elements have been removed [success]

$ drush migrate-orphans-purge MyMigration
Total migrated: 101
Total orphans: 0
There are no more orphan elements [success]