Comments (6)
I've double checked the current table names and it looks like the table names are the ones without the 3
:
social/lib/Db/CoreRequestBuilder.php
Lines 60 to 74 in dc640af
So rather drop the old ones, aka oc_social_3_action
instead of oc_social_action
.
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
from social.
Thank you, @nursoda!
I had a similar problem upgrading on stable branch to 28.0.0 ...
Exception: Database error when running migration 28000Date20230906104802 for app core
Index name "afoa" for table "oc_social_follow" collides with the constraint on table "oc_social_3_follow".
Update failed
And your solution solved the problem :)
(PHP Version: 8.1.18)
from social.
Probably true, yet after
occ upgrade
occ db:add-missing-indices
I ended up with the proper tables:
show tables;
oc_social_action
oc_social_actor
oc_social_cache_actor
oc_social_cache_doc
oc_social_client
oc_social_follow
oc_social_hashtag
oc_social_instance
oc_social_req_queue
oc_social_stream
oc_social_stream_act
oc_social_stream_dest
oc_social_stream_queue
oc_social_stream_tag
from social.
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
- Operating System: Linux 5.15.0-91-generic x86_64
- Web server: nginx 1.25.1
- Database: mysql 10.6.12
- PHP: 8.1.2
- Nextcloud 27.n.5 -> 28.0.1
Edit 1
I had to delete the following indexes to be able to proceed with the installation. I tried to do an occ update
from the command line after each drop index
.
MariaDB [nextcloud]\> drop index sh on oc_social_stream_tag;
MariaDB [nextcloud]\> drop index afoa on oc_social_follow;
MariaDB [nextcloud]\> drop index aoa on oc_social_follow;
MariaDB [nextcloud]\> drop index object_id_prim on oc_social_3_stream;
MariaDB [nextcloud]\> drop index attributed_to_prim on oc_social_3_stream;
MariaDB [nextcloud]\> drop index in_reply_to_prim on oc_social_3_stream;
MariaDB [nextcloud]\> drop index ipoha on oc_social_3_stream;
MariaDB [nextcloud]\> drop index nid on oc_social_3_cache_actor;
On attempting to drop that last one, I got the error:
ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key
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)
MariaDB [nextcloud]\> 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;
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.
It renders fine on the Android Nextcloud app, and is fully interactive. I removed all cached cookies and files in Firefox and logged in again, but the issue remains.
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:
The clue might be in the cookie trail: I don't expect to see the directory "files" in there.
- "Shares" works correctly.
- "Tags" works correctly.
- "External storage" isn't enabled. (I'll tell you sometime about my attempts to use B2 with the S3 connector. brrrrrrr.)
When I open the "Files" app from the header icon, the URL looks like this:
https://next.fluidlogic.io/apps/files/
The page content is rendered correctly.
When I click on "All Files", the URL turns into this:
https://next.fluidlogic.io/apps/files/files
I see the same content as in the link above.
Opening a file from either view lands me on a URL like this:
https://next.fluidlogic.io/apps/files/files/1368447?dir=/Books%2C%20Articles%20and%20Papers&openfile=true
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.
from social.
I'm running into the same issue. Update failed from 28.0.0 to 28.0.1 as well.
Exception: Database error when running migration 28000Date20230906104802 for app core Index name "afoa" for table "oc_social_3_follow" collides with the constraint on table "oc_social_follow".
I'd prefer not to fiddle with the database and corrupting it further, but I can't access the instance either as it awaits the occ upgrade command which fails.
from social.
Same issue here.
from social.
Related Issues (20)
- Help with redirects breaking Social app for Nextcloud in subdirectories HOT 1
- The parameter is too large for a 32-bit computer HOT 1
- Cannot interact with others - UnauthorizedFediverseException
- Following status of the follow button returns to follow after refresh. following not saved HOT 3
- edit user - fields not in right place HOT 1
- Cannot load Timeline
- Database error when updating from apps
- post don't show up on public profile HOT 2
- Call to undefined method OC\\Server::getEventDispatcher() HOT 9
- Nextcloud Integrity check fail on Social app files
- Friendica cannot connect to Social
- Read a thread
- No boost button HOT 4
- Can't follow peerube account
- The social app is not working correctly HOT 7
- Internal Server Error
- Make new (and more frequent) release(s)?
- Totally doesn't work HOT 4
- Profiles will not open in NC-28 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from social.