Open fbsoft opened 2 years ago
Sounds like the migration was partly run. Then the second run failed.
That was the only app that was requiring to update, after the migration completed, but i couldn't finish the update because of the errors regarding to the table and then the fields mentioned above.
The tables did not have any info inside them, as the email plugin was never used from what i know of ( nobody complained so far ).
The option to continue the migration was to disable the app and continue. After disabling the app and exiting maintenance mode, Nextcloud started without a hitch, and i could see the mail app in the list of apps, and it said that it requires an update. I did not risk it, and i just uninstalled it for now.
I can confirm this bug, I had to disable the mail app to get back into nextcloud.
⚠️ This issue respects the following points: ⚠️
Bug description
The issue is as follows:
I have upgraded from Nextcloud v20.0.14 to 21.0.9. The update went smoothly, no errors. after the upgrade was complete i was prompted to update the mail app I tried to update and i get this error
Doctrine\DBAL\Schema\SchemaException: The table with name 'nextcloud.oc_mail_local_messages' already exists.
`Update to 21.0.9 Doctrine\DBAL\Schema\SchemaException: The table with name 'nextcloud.oc_mail_local_messages' already exists.
Detailed logs Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Doctrine\DBAL\Schema\SchemaException: The table with name 'nextcloud.oc_mail_local_messages' already exists.
The update was unsuccessful. Please report this issue to the Nextcloud community.`
I've renamed the table and tried again, then i get the same type of error but this time it complains about oc_mail_attachments that it has the same column name local_message_id I've renamed this as well, and tried again, after which i get this error :
Setting log level to debug Updating database schema Updated database Updating ...
Exception: Database error when running migration latest for app mail
Update failed
Maintenance mode is kept active
Resetting log level
I could bypass it by disabling the mail app from console
I run on a Ubuntu 18.0.4 LTS with Mysql 8.0 and the nextcloud is a webserver on apache2
Steps to reproduce
Expected behavior
to work, for the mail app update to work
Installation method
Web installer on a VPS or web space
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.3
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response