-
-
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
[Bug]: upgrade 27.1.5.1 to 28.0.1.1 foreign key oc_polls_share #43173
Comments
Workaround:
|
@kesselb Can you explain this error to me? This is a migration method from the core migration. |
Nc first checks for incompatible apps and shows them before starting the upgrade process. Part of the process is upgrading db structure. So if an app is incompatible and should be deactivated to prevent trouble, i think no errors should appear in the upgrade process. The problem is in the app, that's right. But it should never make trouble because it was detected as incompatible and deactivated. Don't you see it that way?
Am 12. Januar 2024 23:12:34 MEZ schrieb "René Gieling" ***@***.***>:
…
@kesselb Can you explain this error to me?
What the hell has this migration do to with the polls app?
`migration 28000Date20230906104802 for app core`
This is a migration method from the core migration.
--
Reply to this email directly or view it on GitHub:
#43173
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
If I understand you right, the migration wanted to add an unique index and this index got the name of an existing index in the table And now? |
Yes
Looks unlikely to me because the index names in https://github.com/nextcloud/server/blob/master/core/Migrations/Version28000Date20230906104802.php are different. 28000Date20230906104802 is the first 28 migration and will trigger this new check to find conflicting index names. The check server/lib/private/DB/MigrationService.php Lines 676 to 681 in 31df9c4
I agree that's a bit weird because the unique index should use a different name already. @jaburio are you using the polls app for quite a while? Maybe the unique key for your installation has no different name in your schema. |
@kesselb Since I feel a little bit unguilty, I would like to close this issue. I don't see that as a task in polls. Or move this issue back to the server repo, if it has to be fixed there. |
This error is not related to the compatibily check. The error is thrown while trying to update another table's indexes. But the conflict should not occure, since the index names are generated by the database and should be unique by definition. |
Hi René,
didn't search for the root but all my thoughts are written above. Of course obviously the error was thrown by the db but i think my config is not that unusual (migrated from oc, no untested apps). So an upgrade should not stop means the updater should be able to handle that problem.
Thanks for your feedback and happy we! :)
Am 27. Januar 2024 09:45:40 MEZ schrieb "René Gieling" ***@***.***>:
…> Nc first checks for incompatible apps and shows them before starting the upgrade process. Part of the process is upgrading db structure. So if an app is incompatible and should be deactivated to prevent trouble, i think no errors should appear in the upgrade process. The problem is in the app, that's right. But it should never make trouble because it was detected as incompatible and deactivated. Don't you see it that way?
This error is not related to the compatibily check. The error is thrown while trying to update another table's indexes. But the conflict should not occure, since the index names are generated by the database and should be unique by definition.
--
Reply to this email directly or view it on GitHub:
#43173
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
@jaburio please share the follwing sql output with us:
You may have to replace "nextcloud" with your actual database name or select the database upfront. |
We got a similar report in #41253 (comment), but for a different table. The user said he created the index manually a while ago because the migration failed. Adding the "needs info" label because we are still waiting for the sql schema. This issue is related to #41253. |
nice |
Bug description
Exception: Database error when running migration 28000Date20230906104802 for app core Foreign key name "FK_1C85E16C3C947C0F" for table "oc_polls_share" collides with the constraint on table "oc_polls_share".
Steps to reproduce
didn't try on a fresh system
Expected behavior
correct update of db scheme
Installation method
Community Manual installation with Archive
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: