-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to NC28 yields "Exception: Database error when running migration…" #1871
Comments
Thank you, @nursoda! I had a similar problem upgrading on stable branch to 28.0.0 ...
And your solution solved the problem :) (PHP Version: 8.1.18) |
I've double checked the current table names and it looks like the table names are the ones without the social/lib/Db/CoreRequestBuilder.php Lines 60 to 74 in dc640af
So rather drop the old ones, aka Arguably the old tables can be removed completely, too: drop table oc_social_3_action; drop table oc_social_3_actor; drop table oc_social_3_cache_actor; drop table oc_social_3_cache_doc; drop table oc_social_3_client; drop table oc_social_3_follow; drop table oc_social_3_hashtag; drop table oc_social_3_instance; drop table oc_social_3_req_queue; drop table oc_social_3_stream; drop table oc_social_3_stream_act ; drop table oc_social_3_stream_dest; drop table oc_social_3_stream_queue; drop table oc_social_3_stream_tag; Just in case, dump the tables as a backup first: mysqldump -u nextcloud -p nextcloud oc_social_3_action oc_social_3_actor oc_social_3_cache_actor oc_social_3_cache_doc oc_social_3_client oc_social_3_follow oc_social_3_hashtag oc_social_3_instance oc_social_3_req_queue oc_social_3_stream oc_social_3_stream_act oc_social_3_stream_dest oc_social_3_stream_queue oc_social_3_stream_tag\
> oc_social_3.bak |
Probably true, yet after
I ended up with the proper tables:
|
I've just attempted an upgrade from fully up-to-date Nextcloud 27 (patch version 5) to 28.0.1 and I encountered this error. I'll attempt to apply the steps @nursoda used in #1871 (comment). I'll edit this as I progress. Edit 0
Edit 1I had to delete the following indexes to be able to proceed with the installation. I tried to do an
On attempting to drop that last one, I got the error:
I had no idea what to do with that; a search for part of the string on this forum didn't return any hits, so I went for the big stick, as outlined by @DivineDominion in #1871 (comment)
From there, I was able to complete the upgrade successfully. I disabled maintenance mode and logged in successfully (in Firefox; that's the sole browser I use with Nextcloud). The admin status page indicated accumulating errors in the log. I investigated; these were related to the unsupported app EmlViewer, so I disabled that. (I've saved the complete stack trace, if anyone's interested.) Now, however, the "Activity" page doesn't render (apart from the background and app icon header). Nor does it render in the Admin settings "Activity" view. In the "Files" app, "All Files" works as it should. "Recent" displays a correct list, but on clicking any of the files I get the following error:
When I open the "Files" app from the header icon, the URL looks like this: When I click on "All Files", the URL turns into this: Opening a file from either view lands me on a URL like this: When my backup has completed overnight, I'll pull down the latest database snapshot and compare it with the previous one and see if file paths are mangled somewhere. Curious to hear from folks who've also encountered this. I've successfully upgraded this instance all the way from Nextcloud 13, addressing errors as they arose. Up until now it's been as flawless as Nextcloud gets - all apps work correctly within the expected constraints and the foundation is solid. I know this is a bit rambling; it's more of an FYI, but I suspect it does point to some deeper issue with the upgrade from 27 to 28. |
I'm running into the same issue. Update failed from 28.0.0 to 28.0.1 as well. |
Same issue here. |
run into the same issue, when ### updating nc from 28.0.8 to nc 29.0.4: Update app deck from App Store InvalidArgumentException: Index name "afoa" for table "oc_social_3_follow" collides with the constraint on table "oc_social_follow".Update failed |
No solution yet? Same when updating from NC v28.0.9.1 to v28.0.10.1. What is safe to delete after the app has been uninstalled? Would be great so see a list of tables and indices. |
had to run to solve: drop table oc_social_3_action; drop table oc_social_3_actor; drop table oc_social_3_cache_actor; drop table oc_social_3_cache_doc; drop table oc_social_3_client; drop table oc_social_3_follow; drop table oc_social_3_hashtag; drop table oc_social_3_instance; drop table oc_social_3_req_queue; drop table oc_social_3_stream; drop table oc_social_3_stream_act ; drop table oc_social_3_stream_dest; drop table oc_social_3_stream_queue; drop table oc_social_3_stream_tag; |
Describe the bug
Upgrading a fully patched NC27 instance to NC28 while the Social app is installed led to the instance being stuck in maintenance mode and required manual intervention in the database.
Created as issue here as requested in the forum by blizzz.
To Reproduce
After an
occ upgrade
to the final NC28 release 28.0.0.11 I also gotSo, using mariadb, I dropped that index, and retried. Each time, I got another index clash. In the end, I had to drop all of these:
Back in the cloud, these rebuild the indices acutally needed:
Expected behavior
Social and core devs should make sure migrations do work as expected?
Client details:
not relevant as not involved
Server details:
Social app version: 0.6.1
Operating system: Arch Linux
Web server: NGINX
Database: Mariadb
PHP version: 8.2
Nextcloud version: 27.1.4.? (release) → 28.0.0.11 (release)
The text was updated successfully, but these errors were encountered: