In the process of upgrading sites from Drupal 6 to Drupal 8 using the information provided by Drupal Documentation, using the drush implementation.

I have a multisite setup in Drupal 8 and found that drush reads the current site according to the values found in /sites/default/settings.php so for each site I upgraded I had to change the database settings in that file to suit the site I was working on.

Amazingly all the content migrated without a problem.  The taxonomy also migrated but did not display.  After investigation I found that the taxonomy_term_hierarchy table is essential and that this was empty.  Since all my taxonomies are flat I was able to rectify this with a simple bit of code run in devel/php

$result = db_query('SELECT tid FROM {taxonomy_term_data} ')->fetchAll(); foreach ($result as $record) { db_query('INSERT INTO {taxonomy_term_hierarchy} (tid, parent) VALUES ( :tid, 0 )', array(':tid' => $record->tid)); }

 

User login