Experimental project

This is a sandbox project, which contains experimental code for developer use only.

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

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

$ 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]
Supporting organizations: 

Project Information