To filter out unwanted migrations from your list you can filter on tag for your Drupal version.
drush migrate:status --tag="Drupal 7"
drush migrate:status --tag="Drupal 6"
Original
I've been working for some time trying to upgrade a site from D7 to D8 using https://drupalize.me/blog/201604/custom-drupal-drupal-migrations-migrate... as my guide. There seemed to be artifacts from a D6 to D7 migration, so I did a D2D from 7 to 7 hoping this would remove these artifacts. Having spent much time getting the site from one D7 installation to another I am returning to the D8 upgrade using this "clean" version of the site. It seems to have had little impact. When trying to do my custom upgrade I run "drush migrate-status" and I see that it is looking for non-existing D6 tables.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'files' doesn't exist: SELECT COUNT(*) AS expression
FROM
(SELECT 1 AS expression
FROM
{files} f) subquery; Array
(
)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'comments' doesn't exist: SELECT COUNT(*) AS expression
FROM
(SELECT 1 AS expression
FROM
{comments} c
INNER JOIN {node} n ON c.nid = n.nid) subquery; Array
(
)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vocabulary' doesn't exist: SELECT COUNT(*) AS expression
FROM
(SELECT 1 AS expression
FROM
{vocabulary} v) subquery; Array
(
)
I am completely at a loss on where to start addressing this. Searches return little useful information. I don't see a way to tell the upgrade to just ignore them.
Thank you,
Sean
Comments
Comment #2
majorrobot commentedNot sure if you're still having this issue. I ran into the exact same issue migrating from D7 to 8.5.0 last week.
I found that I had apparently run drush migrate-upgrade twice, and this had caused it for me. There must be something about that command that, if it has already run, goes back and looks for more stuff to migrate ... even if there's nothing else to migrate.
Comment #3
benstallings commentedThe larger problem here is that any time you run
drush migrate-statuswithout specifying a--group, it checks for all migrations that are known to Drupal. If migrate_drupal module is enabled, then all of the D6 and D7 migrations that are defined in that module are known to Drupal, whether or not they are applicable to the current site.Unless I'm mistaken, the easiest way to solve this problem would be to separate migrate_drupal into two different submodules for D6 migrations and D7 migrations so that they could be enabled individually. I have trouble imagining a realistic case study where someone would want to import from both a D6 and a D7 site, and yet that is the default configuration.
Unfortunately I'm not ambitious enough to attempt to separate the module and offer a patch. I leave that to someone who has a better understanding of how the module works.
Comment #4
quietone commentedThe migrations can be identified by the migration_tags (not groups). The current tags are 'Drupal 6', 'Drupal 7', 'Configuration' and 'Content'. So, commands like
drush ms --tag="Drupal 6should work to limit the output.Yes, when Migrate Drupal is enable all the available migrations are discovered. The idea of separating migrate_drupal into two modules is interesting but at least one thing that makes that not attractive is that some migrations are valid for both Drupal 6 and Drupal 7.
Comment #5
clemens.tolboom@quietone thanks for the tip.
I ran into this for a D6 site. This solves the command line UX output
./vendor/bin/drush migrate:status --tag="Drupal 6"which is great.What I don't understand is why migrate can list the right migrations when using the tag (shared D6/7 migrations) but still lists items for the wrong version
I see
which seems a bug to me as migration found my D6 database.
Comment #9
quietone commentedLooks like this has been resolved. The way core finds all the migrations is working as designed.
The solution to limiting the output is to use the --tag option on the migrate-status command.
Comment #10
rupertj commentedI came across this issue while trying to get rid of the annoying D6 migration error messages on a D7->D8 upgrade. In the end I got rid of them by altering out the D6 migrations, like this:
Comment #11
clemens.tolboomSo this means it still is an issue right?
Comment #12
quietone commentedSorry, as stated in #9 core is working as designed.
The typical way to ignore those messages is to use the filtering options on the `drush ms` command. The solution in #10 will work as well.