mirror of https://github.com/zulip/zulip.git
upgrade-postgresql: Only upgrade to a supported version.
This commit is contained in:
parent
f4b20337a7
commit
875502b2e1
|
@ -12,7 +12,8 @@ export LC_ALL=C.UTF-8
|
||||||
export LANG=C.UTF-8
|
export LANG=C.UTF-8
|
||||||
export LANGUAGE=C.UTF-8
|
export 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)
|
UPGRADE_FROM=$(crudini --get /etc/zulip/zulip.conf postgresql version)
|
||||||
ZULIP_PATH="$(dirname "$0")/../.."
|
ZULIP_PATH="$(dirname "$0")/../.."
|
||||||
|
|
||||||
|
@ -26,6 +27,12 @@ if [[ "$UPGRADE_TO" -lt "$UPGRADE_FROM" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
# 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
|
# Django actually stores its data in. We can only do that if the
|
||||||
# database server is on the same host as the application server.
|
# database server is on the same host as the application server.
|
||||||
|
|
Loading…
Reference in New Issue