Open bpmartin20 opened 1 day ago
Exception: Database error when running migration 30000Date20240717111406 for app core The column "webhook_uri" on table "oc_taskprocessing_tasks" already exists.
I don't see how you could have this column when upgrading from v29. It didn't even exist until v30 (#46579) and was never backported. It doesn't even exist in the v29 code base.
After one failed attempt, I examined the named table and found no data in that column. I deleted the column and retried, but it failed the same way.
Say what? 🤔
Examining a mysql backup taken just before the update, I found that the column did exist prior to initiating the upgrade.
Still a mystery.
Are you sure you don't have multiple Nextcloud instances deployed or something? Like another test instance (maybe that isn't even around anymore) that was previously upgraded that is somehow connected to the same db? Or maybe you attempted a v30 upgrade previously that was aborted for some reason? (Just tossing out ideas to brainstorm: I'm not sure why you encountered this).
There was one similar (but not exactly the same) report in #48372. We can easily check for the column in the migration (before adding the column - basically like #48480), but I fear that's just working around a situation that doesn't make sense to start with. :-)
One thing to comes to mind: #46889 / #46476. Though my understanding is those annotations are just metadata so they really shouldn't be a culprit.
Thank you for the amazingly prompt response. Yes, I've tried the upgrade several times, and apparently I failed to roll the database back successfully somewhere along the line. That explains why I'm the only one seeing this bug issue.
Now the question is how to move forward. Enough time has passed since my first attempts at the upgrade that I can't really roll the database back even if I knew when to roll it back to. I am now running a complete duplicate of my Nextcloud server on a separate machine, so I can test stuff without impacting my production environment. I tried dropping the webhook_uri and webhook_method columns from oc_taskprocessing_tasks, which by the way is an empty table. With that, I was able to run the upgrade successfully in my test environment.
Given that, how would you recommend I proceed? I can do the above, something more, or go as far as reinstalling Nextcloud from scratch if that's what you recommend, so long as when I get done we have all our users, passwords, calendar entries, etc., etc. Any guidance would be greatly appreciated.
⚠️ This issue respects the following points: ⚠️
Bug description
Upgrade from 29.0.9 to 30.0.2 fails to a table column already existing. See "Steps to reproduce" below for details.
Steps to reproduce
1.sudo -u www-data php /var/www/nextcloud/updater/updater.phar
I receive normal messages (backups, downloading, etc.) and then during the upgrade:
Updating database schema Exception: Database error when running migration 30000Date20240717111406 for app core The column "webhook_uri" on table "oc_taskprocessing_tasks" already exists. Update failed
Expected behavior
I expected the upgrade to complete normally, of course. I've run upgrades since version 14, and usually they go quite well.
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
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
After one failed attempt, I examined the named table and found no data in that column. I deleted the column and retried, but it failed the same way. Examining a mysql backup taken just before the update, I found that the column did exist prior to initiating the upgrade.