Upgrade from 19 to 20

Hi Everybody,

I have an installation of NextCloud that I have been upgrading since the version 14 (I think). Not always smoothly, but I always managed to get it upgraded.

However, now I am stuck trying to upgrade from 19.0.7 to 20.0.5.

sudo -u www-data php occ upgrade => Says it is up to date and does not give the option to upgrade to the 20.

‘Settings -> Overview’ => Does not even show any information about upgrade.

sudo -u www-data php /var/www/nextcloud/updater/updater.phar => Shows the possibility of upgrade and let indeed upgrade the system. But the upgrade stops on while running the occ upgrade giving me the following error:

ALTER TABLE oc_authtoken CHANGE password_invalid password_invalid TINYINT(1) DEFAULT ‘0’’: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

I have tried a few things, but it was all in vain. Can anyone help me out?

Otherwise, I will be forced to make a brand new installation of NextCloud 20 and migrate everything (Total pain in the ass and not the system administrator way).

Thank you in advance.

@danilo have you try this ?? Enabling MySQL 4-byte support — Nextcloud latest Administration Manual latest documentation
sudo -u www-data maintenance php occ: mode --on
sudo mysql -u root -p
ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
EXIT;
cd /var/www/nextcloud
sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value=“true”
sudo -u www-data php occ maintenance:repair
sudo -u www-data php occ maintenance: mode --off