Problem/Motivation

SQL update #9107 fail with this error:
Drupal\Core\Database\SchemaException: MySQL needs the 'fid' field specification in order to normalize the 'fid_module_name' index in Drupal\mysql\Driver\Database\mysql\Schema->getNormalizedIndexes() (linea 329 di /var/www/drupal/core/modules/mysql/src/Driver/Database/mysql/Schema.php).

Steps to reproduce

Launch update.php script

Comments

tiziano.sartori created an issue. See original summary.

tiziano.sartori’s picture

Issue summary: View changes
clivesj’s picture

Assigned: Unassigned » clivesj
Priority: Major » Minor

Update 9107 is not passing the fid field definitions properly.
I will have a fix for this soon.

I have downgraded the issue to minor.
The update failing only means that the table index is not created, which has no effect on the application other than that the projected increase in speed (with the index) is not achieved.

mageshbcet1’s picture

Hello,

We are also getting this issue during db update after Drupal 10 upgrade. This is blocker for D10 upgrade. When this issue will be fixed?

trickfun’s picture

Same error for me.
Drupal 10.5
Thank you

  • clivesj committed 1ca3b747 on 3.1.x
    Issue #3531198: Database update fails after upgrading to 3.1.6
    
clivesj’s picture

Status: Active » Fixed

In this fix updates 9106 and 9107 are cancelled.
Sites that successfully ran either of those updates will have the index on the table filebrowser_metadata_entity. Those where the updates failed will not.

If you have a large table and want to improve the performance, you can manually add the index to the table by using a query like this one for your database installation:
CREATE INDEX fid_module_name USING BTREE ON filebrowser_metadata_entity (fid, module, name);

The automated process using the database abstraction layer does not work consistently across the various (versions of) databases and versions of Drupal. I have no time to further work on this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.