YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
149 stars 64 forks source link

Database index error as updating v27 to v28 #646

Closed klorydryk closed 10 months ago

klorydryk commented 10 months ago

Trying to update my last ynh nextcloud 27 version to v28ynh1, I got this message, then the application has been restored to v27 :

Info : DEBUG - Updating database schema
Info : DEBUG - Exception: Database error when running migration 28000Date20230906104802 for app core
Info : DEBUG - Index name "nid" for table "oc_social_3_stream" collides with the constraint on table "oc_social_3_cache_actor".
Info : DEBUG - Update failed
Info : DEBUG - Maintenance mode is kept active
Info : DEBUG - Resetting log level
Info : DEBUG - + '[' 5 -eq 3 ']'
Info : DEBUG - + ynh_die '--message=Unable to upgrade Nextcloud'
Info : DEBUG - + ynh_exit_properly
Attention : Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
klorydryk commented 10 months ago

Found the issue in the official repository : https://github.com/nextcloud/server/issues/41253 Solution is here (to drop ancient "Social" tables from database): https://github.com/nextcloud/server/issues/41253#issuecomment-1853559554