Database migration on update fails

Hi, I just updated my nextcloud from 28.0.7 to 29.0.3. It runs with NextCloudPi on a Pi 4.
When I ran occ upgrade for the first time, the db migrations kept being stuck in a loop, about 5 of them always reappeared after a few seconds.
After a few minutes I stopped the script with ^C and started it again.
Then I got this message:

./occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
InvalidArgumentException: Index name "news_feeds_user_id_index" for table "oc_news_feeds" collides with the constraint on table "oc_news_feeds_bkp".
Update failed
Maintenance mode is kept active
Resetting log level

This not only seems to be a rather old migration, I also haven’t had the news app installed since many years!

Has anyone an idea where this weird migration is coming from? Or, to investigate this further myself, explain, how database migrations in Nextcloud work?

In the meantime, I found the following entries in the oc_migrations table:

select version from oc_migrations where app = "news";
+--------------------------+
| version                  |
+--------------------------+
| 140200Date20200824201413 |
| 150004Date20201009183830 |
| 150005Date20201009192341 |
| 150200Date20210118190652 |
| 150203Date20210204203051 |
| 150302Date20210312231251 |
| 150400Date20210318215425 |
+--------------------------+

So the migration seems to be the first one. I still want to emphasize that I do not have a news dir in Nextcloud /apps directory. Why does the updater wants to make this migration?

Most likely because you haven’t purged the News app data from the database. Check-out the following posting for further information:

1 Like

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