Taxonomy fields can't apply Database update from update 9301

Created on 28 December 2022, over 1 year ago
Updated 18 January 2023, over 1 year ago

Problem/Motivation

I'm unable to apply the database updates from update 9301 because we have a field attached to a Taxonomy entity. The update as it exists is only for a hardcoded field name prefixed with `node__`, however our field is prefixed with `taxonomy_term__`, which then fails the update attempts.

Failed: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.node__field_best_bet' doesn't exist: ALTER TABLE node__field_best_bet MODIFY field_best_bet_query_text VARCHAR(360); Array ( ) in search_api_best_bets_update_9301() (line 27 of /code/web/modules/composer/search_api_best_bets/search_api_best_bets.install

In the above error, taxonomy_term__field_best_bet exists, but node__field_best_bet does not, so the ALTER TABLE continuously fails.

Steps to reproduce

  1. Install 2.0.0
  2. Create field and assign to taxonomy
  3. Update to 2.0.1
  4. Run drush updatedb or /update.php

Proposed resolution

Rewrite install changes to be entity type independent

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.69.0 2024