mattermost-community / focalboard

Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana.
https://www.focalboard.com
Other
22.06k stars 1.99k forks source link

Bug: Upgrading leads to error in focalboard plugin: Error 1054: Unknown column 'dirty' in 'field list' in line 0 #4861

Open Iceforgedmvp opened 1 year ago

Iceforgedmvp commented 1 year ago

After updating Mattermost (Team Edition) from 7.1.5 (ESR) to 7.8.2 (ESR) or from 7.8.2 to 7.8.9 (ESR) the following error occurs on startup. Running journalctl -u mattermost -r gives the following output:

Aug 20 14:21:54 mattermost mattermost[1370]: {"timestamp":"2023-08-20 14:21:54.498 +02:00","level":"error","msg":"Failed to sync plugin from file store","caller":"app/plugin.go:366","bundle":"plugins/focalboard.tar.gz","error":"installExtractedPlugin: Unable to restart plugin on upgrade., error initializing the DB: Error 1054: Unknown column 'dirty' in 'field list' in line 0: SELECT version, dirty FROM focalboard_schema_migrations LIMIT 1"}

Aug 20 14:21:54 mattermost mattermost[1370]: {"timestamp":"2023-08-20 14:21:54.478 +02:00","level":"error","msg":"Table creation / migration failed","caller":"app/plugin_api.go:976","plugin_id":"focalboard","error":"\"Error 1054: Unknown column 'dirty' in 'field list' in line 0: SELECT version, dirty FROM focalboard_schema_migrations LIMIT 1\""}

Steps to reproduce the behavior

Update Mattermost (Team Edition) from 7.1.5 (ESR) to 7.8.2 (ESR) or 7.8.9 (ESR):

sudo su
systemctl stop mattermost

# Backup
cd /opt
rm -rf mattermost-back* mattermost-upgrade
cp -ra mattermost/ mattermost-back-$(date +'%F-%H-%M')/

# Upgrade
wget https://releases.mattermost.com/7.8.9/mattermost-team-7.8.9-linux-amd64.tar.gz
tar -xf mattermost*.gz --transform='s,^[^/]\+,\0-upgrade,'

find mattermost/ mattermost/client/ -mindepth 1 -maxdepth 1 \! \( -type d \( -path mattermost/client -o -path mattermost/client/plugins -o -path mattermost/config -o -path mattermost/logs -o -path mattermost/plugins -o -path mattermost/data \) -prune \) | sort | sudo xargs rm -r

cp -an mattermost-upgrade/. mattermost/
chown -R mattermost:mattermost mattermost
setcap cap_net_bind_service=+ep ./mattermost/bin/mattermost

# Restart service
systemctl start mattermost

# View log
journalctl -u mattermost -r

Expected behavior

Mattermost should start without errors.

Edition and Platform