Nextcloud upgrade to 28.0.1 (hub 7) Exception: Database error during upgrade

Nextcloud version (eg, 20.0.5): 28.0.01
Operating system and version (eg, Ubuntu 20.04): 22.04
Apache or nginx version (eg, Apache 2.4.25): Ngnix
PHP version (eg, 7.4): 8.1

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upgrade from Nextcloud 27.1.5 to 28.0.1

Error
when running migration 28000Date20230906104802 for app core Index name “ts” for table “oc_social_stream_dest” collides with the constraint on table “oc_social_3_stream_dest”.

**Upgrade steps:**
Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

Repair info: All tables already have the correct collation -> nothing to do

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Exception: Database error when running migration 28000Date20230906104802 for app core Index name "ts" for table "oc_social_stream_dest" collides with the constraint on table "oc_social_3_stream_dest".

Looks a bug, please advise if more logs are required.

With a bit of digging on the github I found the following issue which provides the clues on how to resolve: [Bug]: Database error when running migration 28000Date20230906104802 · Issue #41253 · nextcloud/server · GitHub

Basically drop the tables and or indices mentioned in the error in the database. Once complete restart upgrade from the prompt and after upgrade is completed finally disable maintenance mode.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.