Running update.php fails for me after upgrading to the latest release of filebrowser with following message:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "USING" LINE 1: CREATE INDEX fid_module_name USING BTREE ON filebrowser_meta... ^: CREATE INDEX fid_module_name USING BTREE ON filebrowser_metadata_entity (fid, module, name); Array ( ) in filebrowser_update_9106()
I assume this is related to this update: https://www.drupal.org/project/filebrowser/issues/3361551
Versions:
- Drupal: 10.4.7
- PHP: 8.2.28
- Database: PostgreSQL 15.13
Comments
Comment #2
clivesj commentedMy bad!
I overlooked that that query does not run on PostgreSQL.
I am preparing a fix for this.
Comment #4
clivesj commentedI have released 3.1.6 that contains a fix for this.
Testing showed that on some Postgres, the update failed silently, not adding the index but at the same time marking update 9106 as completed. Others will fail and mark the update as non-completed.
I have to make sure all sites will receive the update to add the index and no site is stuck at update 9106.
To solve this and prevent the need to manually update the schema-version in the key-value table, I have chosen to re-write update 9106 to a no-op (empty) function. I know we are not supposed to change published install hooks, but I think in this case it is perfectly safe and always better than asking people to manually adjust the database.
Comment #5
lewih commentedHello community!
I just updated from version 3.1.4 to 3.1.6.
By running drush updb I get the following error:
On update.php I have:
I am running:
mysql Ver 8.0.41-0ubuntu0.24.04.1 for Linux on x86_64 ((Ubuntu))
Drupal 10.5.0.
PHP 8.3.20
May the error be related to this issue ?
Thanks in advance!
Best,
MP
Comment #6
clivesj commentedUnfortunately there is still a bug in the update script.
I will fix the issue here:
https://www.drupal.org/project/filebrowser/issues/3531198