when updating from 8.5.x to 8.6.1, an error happened when running one of the database update instructions. More precisely, the error occurs when Drupal is trying to run function taxonomy_update_8502()
.
This is the error message I get.
Update #8502
Failed: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydbname.taxonomy_term_hierarchy' doesn't exist:SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {taxonomy_term_hierarchy} taxonomy_term_hierarchy) subquery; Array()
intaxonomy_update_8502()
(line 37 of /var/www/html/core/modules/taxonomy/taxonomy.install).
I can see why the error is happening. The taxonomy_term_hierarchy table doesn't exist any longer in the database and this database update is trying to remove it. Reading about this issue, I found that Drupal 8.6.x moves data from the old table (taxonomy_term_hierarchy) into the new table (taxonomy_term__parent).
Something must have halted the database update, and Drupal thinks the update function hasn't executed, but I can see on the new taxonomy_term__parent table is there. Perfect! So I still have pending updates I need to run, and now I need taxonomy_update_8502()
to get out of my way.
How can I tell Drupal to forget that database update, or just ignore it, or even artificially consider it has ran already? Is there something I can do in that regard, like definitely skipping a database update?
drush pm-update --lock=taxonomy
. – berramou Oct 17 '18 at 21:07--lock
instruction and I will definitely have problems when the Taxonomy module issues a new database update. – Marcos Buarque Oct 19 '18 at 1:36--lock
, other wise if the issue comes fromTaxonomy Module
in the8.6.1
version, you should open an issue to theTaxonomy
issue queue, after the issue fixed and committed you won't need--look
anymore, did you try to update from8.5.x
to8.6.1
in fresh install to see if the issue from your db or in the taxonomy module? – berramou Oct 19 '18 at 8:51