Problem upgrading from 12.0.3 to 12.0.4 (utf8mb4)

Hello,

I am trying to upgrade from 12.0.3 to 12.0.4 via a docker-compose file.
When I start the upgrade process with
docker-compose exec -u www-data app php occ upgrade
I get the error

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_vcategory     CHANGE `uid` `uid` VARCHAR(64) DEFAULT '' NOT NULL, CHANGE `type` `type` VARCHAR(64) DEFAULT '' NOT NULL, CHANGE `category` `category` VARCHAR(255) DEFAULT '' NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
Update failed

This seams to be a problem concerning my recent change to utf8mb4. In this process I had to alter some databases to use no strings longer than 191 characters.

I already tried this with the ‘category’ field but this did not work.

alter table `oc_vcategory` change `category` `category` varchar(191) character set utf8mb4 collate utf8mb4_bin null default null;

Thanks for your help!

Since I have the same problem again during the update to 12.0.5 I decided to ask again for help.
As a workaround for the last update I replaced all <length>255</length> lines in db_structure.xml with smaller values. But this is not solving the source of the problem.

I once again checked all prerequisites in the documentation and they were all correct: innodb_large_prefix is enabled as it is the default. But also with innodb_large_prefix=true or innodb_large_prefix=1 the limit is not raised above 1000 bytes. File format is Barracuda for all tables and I also checked that there is a single file for each database table.

select * from information_schema.INNODB_SYS_TABLES; gives
...Barracuda | Compressed... for all nextcloud tables.
SYS_*-tables on the other hand are still Antelope file format. Could this be the problem?

I also searched all over the web for a solution but nothing worked. I am really out of ideas here. Does anybody have a hint for me?

Edit: Changing the ROW_FORMAT from Compressed to Dynamic as stated in the “more experimental” steps did not solve the problem either.

With show table status; I noticed that some tables still used MyISAM as storage engine. This explained the limit of 1000 Bytes.
I changed the engine to InnoDB and that fixed my problems.