Updating MariaDB to utf8mb4 character set failed

My version of HedgeDoc is: 1.9.3 and 1.9.4

What I expected to happen:

Convert MariaDB from utf8 (aka utf8mb3) to utf8mb4 as indicated here in regards to the 1.9.3 release.

What actually happened:

I followed the directions that @agross outlined in issue 321 and the database appeared to convert. However, my logs repeat this:

hedgedb | 2022-05-26T13:42:19.195934326Z 2022-05-26 13:42:19 6 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'). hedgedb | 2022-05-26T13:42:19.196017170Z 2022-05-26 13:42:19 6 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).

I already tried:

I decided best bet was to go back to a mysqldump. But get:

ERROR 1005 (HY000) at line 25: Can't create table 'hedgedoc'.'Authors' (errno: 150 "Foreign key constraint is incorrectly formed")

I tried docker exec -i hedgedb mysql_upgrade --user hedgedoc --password=redacted hedgedoc
based on this Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type | DigitalOcean

That conversion gave me a bunch of OKs, so I restarted the docker compose file and now things are really broken:

hedgeapp | 2022-05-26T14:10:38.568594675Z
hedgeapp | 2022-05-26T14:10:38.750446745Z 2022-05-26T14:10:38.749Z info: deserializeUser: 281d6306-835d-4177-af23-63bf40de2c26
hedgeapp | 2022-05-26T14:10:38.805723307Z 2022-05-26T14:10:38.804Z error: Table ‘hedgedoc.Authors’ doesn’t exist
hedgeapp | 2022-05-26T14:10:38.994588593Z 2022-05-26T14:10:38.994Z info: deserializeUser: 281d6306-835d-4177-af23-63bf40de2c26
hedgeapp | 2022-05-26T14:10:39.022967210Z 2022-05-26T14:10:39.022Z info: redacted_IP - - [26/May/2022:14:10:39 +0000] “GET /500 HTTP/1.1” 500 - “https://redacted_URL” “Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0”

Now opening any HedgeDoc document or creating a new one gives me a “500 Internal Error wtf” error. If anyone could donate some wisdom, I’d much appreciate it as I’m in over my head and fear I’ve both corrupted the database and made the backup dump somehow incompatible.

I originally posted this as an issue in the container git repository but I don’t think anyone has seen it (and I’ve used up my 2 links for new posters, sorry)