1

I'm quite new to Drupal and tried my first Migration from Drupal 6 to Drupal 8. I didn't want to migrate the entire page but only some nodes. So i got a tutorial and wrote a custom migration module (with dependencies of Migrate Plus and Migrate Drupal) with the following files in it:

  • one migration-group.yml
  • two .yml with the field mapping definitions for my entities
  • an .info.yml for my module

When I do a migration-status with drush, i can see my two migration entities. But when I try to migrate-import one of them, I get the following error: SQLSTATE[42S02]: Base table or view not found But actually the table is right there in the db.

I executed the following drush commands:

vendor/bin/drush ms --uri=mydrupal8-site.test

The result is:migration_id So everything's fine.

Then i run the command:

vendor/bin/drush migrate:import external_page_01 --uri=mydrupal8-site.test

...and i get the error. I have to use the --uri-param because i have a multisite-installation. I have put the legacy-Database connection into my settings.php-file, like so:

    'database' => 'd8',
    'username' => 'root',
    'password' => '',
    'prefix' => '',
    'host' => 'localhost',
    'port' => '3306',
    'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
    'driver' => 'mysql',
);
$databases['legacy']['default'] = array (
    'database' => 'd6',
    'username' => 'root',
    'password' => '',
    'prefix' => '',
    'host' => 'localhost',
    'port' => '3306',
    'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
    'driver' => 'mysql',
);

I read a post according to this topic which unfortunately refers to a D6 to D7 migration, so those anwers don't work for me.

Does anybody know how to solve this for D8?

Thanks and best regards Rebekka

  • Hi, I'm not sure if there is enough information here. It may help to include some more details about the arguments for the drush commands you ran. It's possible that maybe migrate-import doesn't know how to connect to the source database for your migration. – mradcliffe May 3 at 11:56
  • Hello mradcliffe, thx for your answer. I have the command "drush migrate:import external_page_01 --uri=mydrupal8-site.test". The parameter --uri is necessary cause i have a multisite-drupal running and otherwise the module cant be found. – Rebekka May 3 at 12:10

Your Answer

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

Browse other questions tagged or ask your own question.