1

I'm trying to set migrations between an online D6 website and a local D8 one. So I want to connect to D6 DB like this:

drush @vmdevd8ce  migrate-upgrade --legacy-db-url=mysql://d6dbuser:d6dbpass@d6server/d6_distantdb --legacy-root=http://www.d6url.com --configure-only

drush @vmdevd8ce  migrate-upgrade --legacy-db-url=mysql://d6dbuser:d6dbpass@d6serverdistantdb  --legacy-db-prefix=dbpref_ --legacy-root=http://www.d6url.com --configure-only  --debug

My distant DB have a prefix name but no prefix table name. But I get PHP error :

PHP Fatal error:  Call to undefined method Drush\Sql\SqlBase::dbSpecFromDbUrl() in /var/www/drupal-8/modules/contrib/migrate_upgrade/src/MigrateUpgradeDrushRunner.php on line 131
Drush command terminated abnormally due to an unrecoverable error.                                                                                               [error]
Error: Call to undefined method Drush\Sql\SqlBase::dbSpecFromDbUrl() in /var/www/drupal-8/modules/contrib/migrate_upgrade/src/MigrateUpgradeDrushRunner.php, line
131

Additionnal debug infos:

Drush bootstrap phase : bootstrap_drupal_database() [0.18 sec, 8.59 MB]                                                                                          [bootstrap]
Successfully connected to the Drupal database. [0.18 sec, 8.59 MB]                                                                                               [bootstrap]
Find command files for phase 4 (max=5) [0.18 sec, 8.59 MB]                                                                                                           [debug]
Drush bootstrap phase : bootstrap_drupal_full() [0.19 sec, 8.59 MB]                                                                                              [bootstrap]
About to bootstrap the Drupal 8 Kernel. [0.19 sec, 8.59 MB]                                                                                                          [debug]
Finished bootstraping the Drupal 8 Kernel. [0.24 sec, 17.14 Mo]                                                                                                      [debug]
Cache HIT cid: 8.1.16-install_profile-6dfce66ee85e248453041340113581eb [0.27 sec, 18.11 Mo]                                                                          [debug]
Find command files for phase 5 (max=5) [0.27 sec, 18.21 Mo]                                                                                                          [debug]
Cache HIT cid: 8.1.16-install_profile-6dfce66ee85e248453041340113581eb [0.27 sec, 18.22 Mo]                                                                          [debug]
Cache HIT cid: 8.1.16-commandfiles-5-92e6238332978e1955a818fdda414315 [0.28 sec, 18.6 Mo]                                                                            [debug]
Bootstrap to phase 6. [0.48 sec, 21.64 Mo]                                                                                                                       [bootstrap]
Drush bootstrap phase : bootstrap_drupal_login() [0.48 sec, 21.64 Mo]                                                                                            [bootstrap]
Find command files for phase 6 (max=6) [0.5 sec, 22.06 Mo]                                                                                                           [debug]
Found command: migrate-upgrade (commandfile=migrate_upgrade) [0.5 sec, 22.06 Mo]                                                                                 [bootstrap]
Calling hook drush_migrate_upgrade [0.57 sec, 25.11 Mo]                                                                                                              [debug]
Undefined index: legacy-db-key MigrateUpgradeDrushRunner.php:119 [0.57 sec, 25.23 Mo]                                                                               [notice]
PHP Fatal error:  Call to undefined method Drush\Sql\SqlBase::dbSpecFromDbUrl() in /var/www/drupal-8/modules/contrib/migrate_upgrade/src/MigrateUpgradeDrushRunner.php on line 131
Drush command terminated abnormally due to an unrecoverable error.                                                                                               [error]
Error: Call to undefined method Drush\Sql\SqlBase::dbSpecFromDbUrl() in /var/www/drupal-8/modules/contrib/migrate_upgrade/src/MigrateUpgradeDrushRunner.php, line
131 [0.57 sec, 25.23 Mo]

If I try to connect to a local D6DB, it works. So what is missing in my command ? is it a drush limitation ?

Thanks

1

Well, it seem the issue come from the Migrate update module 8.x-3.0-rc5, rollback to 8.x-3.0-rc4 fix it. No prefix information needed for a prefixed DB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.