MariaDB error after upgrade

I just upgraded to the latest Vikunja available on dockerhub (Frontend Version: 0.20.1, API Version: v0.20.1, can’t remember which version I upgraded from), and now I am getting this recurring error:

vikunja-mariadb   | 2022-11-15  8:25:00 584 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
vikunja-mariadb   | 2022-11-15  8:25:00 583 [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').

I suspect there was a missing database upgrade task…

Can anyone suggest a fix?

I think you need to upgrade this by running mysql_upgrade from within the database as root user.

I had this same issue and this fixed it. Thank you.

[ERROR] Incorrect definition of table mysql.column_stats: expected column ‘histogram’ at position 10 to have type longblob, found type varbinary(255)

Specifically I am running this via docker-compose and was able to do a docker exec -it vikunja_db_1 bash and then the mysql_upgrade -p and passing in my db password from my compose file. I hope this helps the next person who searches this.