We're Hiring!

Mattermost, Inc.

Database schema version 5.18.0 is no longer supported

Hello,

after reading

https://docs.mattermost.com/administration/upgrade.html and
https://docs.mattermost.com/administration/important-upgrade-notes.html

I tried to update a 5.18.0 installation to version 5.29.1. Starting the server fails with the following error:

*Dez 16 12:45:26 mm.intern.xxxx.de platform[13719]: {"level":"info","ts":1608119126.2882366,"caller":"sqlstore/supplier.go:200","msg":"Pinging SQL master database"}*
*Dez 16 12:45:26 mm.intern.xxxx.de platform[13719]: {"level":"error","ts":1608119126.3033447,"caller":"sqlstore/upgrade.go:96","msg":"Database schema version 5.18.0 is no longer supported. This Mattermost ser...*
*Dez 16 12:45:27 mm.intern.xxxx.de systemd[1]: mattermost.service: main process exited, code=exited, status=234/MAKE_STARTER*

In the important upgrade notes I only found a mysql command for version 5.22.0, but this did not change the error.

How to I update the database schema?

Thanks for any hints and suggestions,

Stefan

Hi, @smguenther

Since you are upgrading from 5.18.0 to the latest version, let us take a look at the SQL query that you need to run:

ALTER TABLE Reactions DROP PRIMARY KEY, ADD PRIMARY KEY (PostId, UserId, EmojiName);

Once that is completed, can you please confirm that the Reactions table look like this?

mysql> DESCRIBE Reactions;
+-----------+-------------+------+-----+---------+-------+
| Field     | Type        | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| UserId    | varchar(26) | NO   | PRI | NULL    |       |
| PostId    | varchar(26) | NO   | PRI | NULL    |       |
| EmojiName | varchar(64) | NO   | PRI | NULL    |       |
| CreateAt  | bigint(20)  | YES  |     | NULL    |       |
+-----------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

Can you also set the FileLevel parameter to DEBUG as well so we can get more details on the error that you are seeing when attempt to bring up the server again?

    "LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "DEBUG",
        "ConsoleJson": false,
        "EnableFile": true,
        "FileLevel": "DEBUG",
        "FileJson": true,
        "FileLocation": "",
        "EnableWebhookDebugging": true,
        "EnableDiagnostics": false,
        "EnableSentry": true,
        "AdvancedLoggingConfig": ""
    }