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

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 @_@

@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.


Here it is:

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?

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:

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ā€