Follow on problem with NextCloud upgrade breaking while OnlyOffice is installed

So, now, I ran through the command line steps to remove OnlyOffice from the NextCloud installation. This

allowed NextCloud to be updated and working. But, when I attempt to reinstall OnlyOffice and activate it, I receive the error:

Database error when running migration 070400Date20220607111111 for app onlyoffice An exception occurred while executing a query: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation “share_id_index” already exists

Any suggestions of solving this?

Thank you,


i had the same problem. try to run in the Docker of Nextcloud the following:

./occ db:add-missing-indices
./occ db:add-missing-primary-keys
./occ db:add-missing-columns
./occ db:convert-filecache-bigint

and then try sudo -u www-data php /var/www/html/occ upgrade

at the end run again the updates:

sudo -u www-data php /var/www/html/updater/updater.phar --no-interaction

Best regards