Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mattermost version to 9.11.0 #78

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Terminate on error
set -e

MATTERMOST_VERSION=8.1.13
MATTERMOST_VERSION=9.11.0

# Prepare variables for later use
images=()
Expand Down
30 changes: 30 additions & 0 deletions imageroot/update-module.d/10database_upgrade
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

# redirect the standard output to the standard error
exec 1>&2

# check upgrade requirement : https://docs.mattermost.com/upgrade/important-upgrade-notes.html
# fix for database upgrade from 8.1.13 to 9.11.0

# test if the postgres-app is active
if ! systemctl is-active -q --user postgres-app.service; then
echo "Postgres service is not active, exiting"
exit 0
fi

echo "Postgres service is active, we start database upgrade to 9.11.0"

podman exec -i postgres-app bash -c '
PGPASSWORD="Nethesis,1234" psql -U mattuser -d mattermost -c "
CREATE TABLE IF NOT EXISTS retentionidsfordeletion (
id varchar(26) PRIMARY KEY,
tablename varchar(64),
ids varchar(26)[]
);
CREATE INDEX IF NOT EXISTS idx_retentionidsfordeletion_tablename ON retentionidsfordeletion (tablename);
"'
Loading