Posting this for others that may have had a similar issue with trying to upgrade Nextcloud.
After a few years of upgrading a Nextcloud instance, it final got stuck on v25.0.2.3, and every time I went through the upgrade process to the next v25.0.x, it kept coming up with the exception:
"Updates between multiple major versions and downgrades are unsupported".
So having to revert back. So finally, after a good while, finally getting the time, dug into the code to see what was triggering this exception ( and maybe if I code manually hard code a bypass).
I ended up in the source file: “[nextcloud]/lib/private/Updater.php”
and the functions doUpgrade
and isUpgradePossible
, where I found (grep’ing) the exception string.
doUpgrade
calls isUpgradePossible
, and this pulls a config value with config->getAppValue('core', 'vendor', '')
. I thought initially this was in the admin config file: “[nextcloud]/config/config.php”, and was some how missing (by a bad edit on my part :).
I thought this ‘vendor’ value may be the issue, since the next few code lines checks for which vendor it found, and if empty, defaults to “owncloud”, which then compares the versions allowed, pulled from the file: “[nextcloud]/versions.php”
However looking deeper into this getAppValue
function, from the lib “IConfig.php”, it pulls its value from the db, and the “oc_appconfig” table, ahah!
Checking this db table, and no (‘core’,‘vendor’,‘nextcloud’) record, and so added it… Then gave another kick at the upgrade to v25.0.13, and shebang, it worked.
I thought I would share this, if any of you may run into a similar issue, where you are trying to upgrade within the same major version, and as I was, keeping getting stumped with this unsupported
error.
Maybe a dev may see this and update the default on empty vendor to be ‘nextcloud’, as this had me not upgrading for over a year, and wondering how I was going to manually move all my data and setting to a new version.
Glad this solved it, and now up to v28 ;), fewww. Cheers.