-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: added type to createConnectionParams, removed safeguard [restore db conversions] #48666
base: master
Are you sure you want to change the base?
Conversation
/backport to stable30 |
/backport to stable29 |
@juliushaertl @joshtrichards cloud you review this? Or do you know who could? |
This is a proposed alternative to #46908 (not yet reviewed - just noting since that one seemed to have blockers which this will need to make sure it's addressing). |
@Delogon Please stop rebasing / re-merging with master. It's unnecessary at this juncture and just keeps resetting all the tests. :) |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Is this going to be fixed or should we maybe correct the documentation and remove this feature? |
I think removing this feature is a very bad option. The officially suggested method to deploy Nextcloud is with AIO right now. But for the migration it is mandatory to convert the database from mysql to postgres. So if this feature is removed in the future, it should be announced a certain time in advance to give users the opportunity to migrate. But there should be an information in the documentation that this feature is currently broken and therefore disabled. |
I used this PR to migrate my installation from mariadb to postgres a few hours ago. For now everything works fine. |
Hi, I tried to convert my mariadb to pgsql with this code today. It failed with following exceptions when converting the "oc_accounts" table
When I check my mysql database there is only one occurance of the uid.
So '0f97f6aa-3975-4b81-935f-de4a1bac7a2d' is the 'uid' of the "nextcloud" user. When I count this 'uid' I only get one result (as expected)
Is this related or should I open a new issue? |
For those in need to convert their db. I used this PR on 30.0.2 to migrate from MySQL to PostgreSQL without any problems. |
Can someone please review and fix this so it can be merged? Bug #45257 has been in need of fixing for many months. Earlier this year I needed to convert a NC DB from MariaDB to Postgres and had to put in a lot of extra time and effort to work around this bug, and now, when I am converting the DB of another NC instance, I am shocked to find that it still hasn't been fixed. Please, this is an important feature. Can someone take care of it soon? I don't want to sound demanding or ungrateful, I really appreciate everyone's time they put into developing FOSS, I just want to stress how important this feature is and how frustrating it is to users that the bug still hasn't been fixed. Thank you and happy new year everyone! |
I've tried mySQL > PostgreSQL conversion on the freshly installed Nextcloud instance Environment:
I've tried different options with this:
If after that I try to drop
d. If prior to running script I remove Talk app and drop both So I guess, it can be re-enabled for instances without apps. |
Signed-off-by: Nils Wenninghoff <nils@ungemein.cool>
Co-authored-by: Daniel <mail@danielkesselberg.de> Signed-off-by: Nils <github@nospm.xyz>
occ db:convert-type
broken sincePrimaryReadReplicaConnection
support added #45257Summary
This should fix the db conversion bug. $type was added as a parameter to createConnectionParams in the ConnectionFactory.php. There is also a check if the type value is set if not the default is loaded from the config. There is also an additional type check to make sure mysql.utf8mb4 is only used with mysql. The parameters of createConnectionParams in Connection Factory has also been updated, and the safeguard has been removed. The solution was provided in the issue comments by @Queuecumber, @normen, @lightonflux and me.
TODO
occ db:convert-type
broken sincePrimaryReadReplicaConnection
support added #45257Checklist