When upgrading to Drupal 9.3.11 the upgrade fails with the error message:
> [notice] Update started: user_update_9301
> [error] SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "users_uid_seq" already exists: CREATE SEQUENCE users_uid_seq; Array
Tracking down the code i could understand that the statement causing that is
$connection->schema()->changeField('users', 'uid', 'uid', ['type' => 'serial', 'not null' => TRUE], $new_keys);
Causes the issue. A statement that is run on every database type. I have seen that https://www.drupal.org/project/drupal/issues/3255419 🐛 Updating to Drupal 9.3 fails when sql_require_primary_key MySQL system variable is ON. Fixed was an attempt to fix the upgrade for PG and Mysql, but at least for me it has not been solved.
- Run Drupal 8 (8.9.20) on PG14
- Upgrade to Drupal 9.3.11
- Run update-db
Workaround, from #11
drush sql:query "ALTER SEQUENCE users_uid_seq RENAME TO users_uid_seq2"
doing drush updb
.Active
9.3
Particularly affects sites running on the PostgreSQL database.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.