Error on using platform command when upgrading to v4.4 from v4.2


#1

I got this error for every command i enter using bin/platform. This happens after upgrading my Mattermost server from v4.2 to v4.4.

$ bin/platform version
[2017/11/21 08:51:50 UTC] [CRIT] Database schema version 4.4.0 is no longer supported. This Mattermost server supports automatic upgrades from schema version 3.0.0 through schema version 4.3.0. Downgrades are not supported. Please manually upgrade to at least version 3.0.0 before continuing

I searched for documentation about upgrading database but nothing helps. And since the error message is so weird, so i think this probably is a bug.
Anyone know how to fix this @_@


#2

@trungtran Can you paste a screenshot of your About Mattermost dialog? (Mattermost Main Menu > About Mattermost)

It appears you may have initially upgraded to v4.4, then back to v4.3 resulting in this issue.


#3

Here it is:
image


#4

There appears to be a mismatch between your database schema version and your server code version. The database thinks that it is version 4.4.0, but the server code thinks that it is version 4.3.0. Can you describe the upgrade process that you took to get into this state?


#5

Sry for the slow response.

At the beginning, iā€™m using v4.2, then i decided to upgrade to the latest master (maybe this is the main issue) by git pull upstream master. Then i run the deployment scrip again:

make clean
make nuke
make build-client
make build
make package

My mattermost server is serving by this command:
sudo -u mattermost ./bin/platform
When the directory looks like this:

!


#6

There are two potential solutions to your problem:

  1. Upgrade your code base to v4.4. Then it will match the database schema, and everything should just work
  2. Manually remove the isActive column from the UserAccessTokens table and update the Value of the Version Key in the Systems database table to be ā€œ4.3.0ā€