Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upgrade-postgresql: Only upgrade to a supported version.
Alex Vandiver875502b2e13d
diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresqlindex f8d91bf7101..d75deb6d17a 100755--- a/scripts/setup/upgrade-postgresql+++ b/scripts/setup/upgrade-postgresql@@ -12,7 +12,8 @@ export LC_ALL=C.UTF-8export LANG=C.UTF-8export LANGUAGE=C.UTF-8-UPGRADE_TO=${1:-15}+LATEST_SUPPORTED_VERSION=15+UPGRADE_TO=${1:-$LATEST_SUPPORTED_VERSION}UPGRADE_FROM=$(crudini --get /etc/zulip/zulip.conf postgresql version)ZULIP_PATH="$(dirname "$0")/../.."@@ -26,6 +27,12 @@ if [[ "$UPGRADE_TO" -lt "$UPGRADE_FROM" ]]; thenexit 1fi+if [[ "$UPGRADE_TO" -gt "$LATEST_SUPPORTED_VERSION" ]]; then+ echo "This version of Zulip does not support PostgreSQL $UPGRADE_TO."+ echo "You may need to upgrade Zulip before you can upgrade to PostgreSQL $UPGRADE_TO."+ exit 1+fi+# Verify that the version in /etc/zulip/zulip.conf is the version that# Django actually stores its data in. We can only do that if the# database server is on the same host as the application server.