Problem/Motivation

After installing the module, there is a default migration, so after you create your own migration, there will be two migrations.

There may be good reasons for this, I am not sure ... but it can leave the user puzzled, seeing two migrations (default and the user created, "real" migration my_wp) ...

$ drush migrate:status
 ------------------------------------- --------------------------- -------- -------...
  Group                                 Migration ID                Status   Total ...
 ------------------------------------- --------------------------- -------- -------...
  Default (default)                     wordpress_content           Idle     0     ...
  Default (default)                     wordpress_tags              Idle     0     ...
  Default (default)                     wordpress_categories        Idle     0     ...
  Default (default)                     wordpress_attachments       Idle     0     ...
  Default (default)                     wordpress_comment           Idle     0     ...
  Default (default)                     wordpress_authors           Idle     0     ...
                                                                                   ...
  Imports from WordPress site (my_wp)   my_wordpress_attachments    Idle     54    ...
  Imports from WordPress site (my_wp)   my_wordpress_authors        Idle     19    ...
  Imports from WordPress site (my_wp)   my_wordpress_categories     Idle     91    ...
  Imports from WordPress site (my_wp)   my_wordpress_comment_post   Idle     30    ...
  Imports from WordPress site (my_wp)   my_wordpress_content_page   Idle     2     ...
  Imports from WordPress site (my_wp)   my_wordpress_content_post   Idle     24    ...
  Imports from WordPress site (my_wp)   my_wordpress_tags           Idle     0     ...
  Imports from WordPress site (my_wp)   my_wordpress_comment_page   Idle     30    ...
 ------------------------------------- --------------------------- -------- -------...

Steps to reproduce

  1. Install the module
  2. See "Default (default)" migrations is there
  3. Create your own migration, and see "Imports from WordPress site (my_wp)"
  4. Wonder what "Default (default)" does

Proposed resolution

If possible, do not create "Default (default)" migration after installation, to keep things simple?

Remaining tasks

User interface changes

API changes

Data model changes

Comments

ressa created an issue. See original summary.

hongpong’s picture

if there are an extra set of migrations altogether that should not be created AFAIK. hmmm

ressa’s picture

The Drush command is being taken care of in #3578768: drush migrate:import --all fails due to Migrate Tools regression :)

Though, I am still puzzled over seeing two migrations (default and the real migration my_wp) ...

But maybe that's the expected behaviour?

$ drush migrate:status
 ------------------------------------- --------------------------- -------- -------...
  Group                                 Migration ID                Status   Total ...
 ------------------------------------- --------------------------- -------- -------...
  Default (default)                     wordpress_content           Idle     0     ...
  Default (default)                     wordpress_tags              Idle     0     ...
  Default (default)                     wordpress_categories        Idle     0     ...
  Default (default)                     wordpress_attachments       Idle     0     ...
  Default (default)                     wordpress_comment           Idle     0     ...
  Default (default)                     wordpress_authors           Idle     0     ...
                                                                                   ...
  Imports from WordPress site (my_wp)   my_wordpress_attachments    Idle     54    ...
  Imports from WordPress site (my_wp)   my_wordpress_authors        Idle     19    ...
  Imports from WordPress site (my_wp)   my_wordpress_categories     Idle     91    ...
  Imports from WordPress site (my_wp)   my_wordpress_comment_post   Idle     30    ...
  Imports from WordPress site (my_wp)   my_wordpress_content_page   Idle     2     ...
  Imports from WordPress site (my_wp)   my_wordpress_content_post   Idle     24    ...
  Imports from WordPress site (my_wp)   my_wordpress_tags           Idle     0     ...
  Imports from WordPress site (my_wp)   my_wordpress_comment_page   Idle     30    ...
 ------------------------------------- --------------------------- -------- -------...
hongpong’s picture

MigrationGroup::create($group_configuration)->save();
is getting called when it should not be, there is something wrong with the execution flow in the migration generator file. imo that is what causes the default.

ressa’s picture

Title: Command drush migrate:import --all fails first run » Is it possible to avoid creating the Default migration after installation?
Issue summary: View changes

Thanks for looking at this so quickly. I'll re-phrase the issue to focus on the "Default (default)" migration created after installation.