. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "29.0"; then
- printf 'This script upgrades 29.0 to 30.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '29'; then
+ printf 'This script upgrades 29.* to 30.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-VERSION=$(pgsql_version "$@")
-
-if [ "$VERSION" != "28.0" ]; then
- printf 'This script upgrades 28.0 to 29.0. '
- printf 'Reported version is %s. Skipping upgrade.\n' "${VERSION}"
+# Check only major version to allow for intermediary backported schema changes.
+version=$(pgsql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '28'; then
+ printf 'This script upgrades 28.* to 29.0. '
+ printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi