Current behavior

  • For use case where migrate_generator is used solely to generate default content on a site, enabling/using/disabling module leaves some trace behind : the config of migrations generated by the module
  • If these configs are versioned, generated migrations could be modified by a developer which ultimately defeat the purpose of the migrate_generator module for such use-case
  • For now, this can only be prevented by using drush config:delete or simply adding said yml files to .gitignore

Expected behavior

  • Module should provide an easy way to automatically remove all created migration_group and migrations

Proposed resolution

  • An additional drush command can be added to migrate_generator module to do so

Comments

davidferlay created an issue. See original summary.

davidferlay’s picture

Issue summary: View changes
sorlov’s picture

We can use migration_group name to remove all generated migrations

davidferlay’s picture

That sounds good @sorlov !

  • sorlov committed 20dc65e on 8.x-1.x
    Issue #3205125 Add drush command to clean migration group
    
sorlov’s picture

Status: Active » Needs review

Added drush command to remove migration_group (related migrations will be removed too)

davidferlay’s picture

new drush command works like a charm !

drush migrate_generator:clean_migrations migrate_generator_group

davidferlay’s picture

Status: Needs review » Reviewed & tested by the community
sorlov’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.