Internal server error upgrading Nextcloud / UnifiedPush provider server app

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 11.3.0.2
What app is this about: Nextcloud

Describe your issue

Earlier today, I checked the Nextcloud app list, saw the UnifiedPush Provider app was out-of-date and started an upgrade. This led to an internal server error “Exception: Database error when running migration 020100 for app uppush An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1005 Can’t create table nextcloud.oc_uppush_applications (errno: 150 “Foreign key constraint is incorrectly formed”)”. My Nextcloud instance is now in maintenance mode.

I found this similar issue: Nextcloud LinuxServer upgrade fail (uppush error) - #4 by coanda45 - ℹ️ Support - Nextcloud community, but it has a different error message.

I tried the occ commands recommended there, but could not find the occ command.

I would be glad for every help. Thank you.

Share relevant logs or error messages

Update vorbereiten

Log-Level auf “debug” gesetzt

Wartungsmodus eingeschaltet

Reparaturschritt: Repair MySQL collation

Reparaturinformation: All tables already have the correct collation → nothing to do

Reparaturschritt: Copy data from accounts table when migrating from ownCloud

Reparaturschritt: Drop account terms table when migrating from ownCloud

Das Datenbankschema wird aktualisiert

Datenbank aktualisiert

Exception: Database error when running migration 020100 for app uppush An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1005 Can’t create table nextcloud.oc_uppush_applications (errno: 150 “Foreign key constraint is incorrectly formed”)

Das Update ist fehlgeschlagen. Bitte melde dieses Problem an die Nextcloud Community.

we don’t know what Nextcloud version you have…

first
sudo yunohost app shell nextcloud

and then

php occ app:disable uppush
php occ maintenance:repair
php occ upgrade

My NextCloud version: 29.0.10~ynh2. v30 is pending because it requires Yunohost 12.
I am going try your proposals, just before a christmas meeting…

It worked! Now I can access my Nextcloud instance again.

UnifiedPush is now deactivated, but on version 2.1.2, which seems to include a bugfix. Is it safe to reactivate it?