. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if [ "$version" != "22.0" ] && [ "$version" != "22.1" ] && [ "$version" != "22.2" ]; then
- printf 'This script upgrades 22.0 or 22.1 to 23.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != "22"; then
+ printf 'This script upgrades 22.* to 23.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "23.0"; then
- printf 'This script upgrades 23.0 to 24.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '23'; then
+ printf 'This script upgrades 23.* to 24.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "24.0"; then
- printf 'This script upgrades 24.0 to 25.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '24'; then
+ printf 'This script upgrades 24.* to 25.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "25.0"; then
- printf 'This script upgrades 25.0 to 26.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '25'; then
+ printf 'This script upgrades 25.* to 26.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "26.0"; then
- printf 'This script upgrades 27.0 to 27.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '26'; then
+ printf 'This script upgrades 26.* to 27.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "27.0"; then
- printf 'This script upgrades 27.0 to 28.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_version "${@}" | cut -d '.' -f 1)
+if test "${version}" != '27'; then
+ printf 'This script upgrades 27.* to 28.0. '
printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-# Check version.
-version=$(mysql_version "${@}")
-if test "${version}" != "28.0"; then
- printf 'This script upgrades 28.0 to 29.0. '
+# Check only major version to allow for intermediary backported schema changes.
+version=$(mysql_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
. "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
fi
-VERSION=$(pgsql_version "$@")
-
-if [ "$VERSION" != "22.0" ] && [ "$VERSION" != "22.1" ] && [ "$VERSION" != "22.2" ]; then
- printf 'This script upgrades 22.0 or 22.1 to 23.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}" != "22"; then
+ printf 'This script upgrades 22.* to 23.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" != "23.0" ]; then
- printf 'This script upgrades 23.0 to 24.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}" != '23'; then
+ printf 'This script upgrades 23.* to 24.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" != "24.0" ]; then
- printf 'This script upgrades 24.0 to 25.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}" != '24'; then
+ printf 'This script upgrades 24.* to 25.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" != "25.0" ]; then
- printf 'This script upgrades 25.0 to 26.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}" != '25'; then
+ printf 'This script upgrades 25.* to 26.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" != "26.0" ]; then
- printf 'This script upgrades 26.0 to 27.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}" != '26'; then
+ printf 'This script upgrades 26.* to 27.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" != "27.0" ]; then
- printf 'This script upgrades 27.0 to 28.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}" != '27'; then
+ printf 'This script upgrades 27.* to 28.0. '
+ printf 'Reported version is %s. Skipping upgrade.\n' "${version}"
exit 0
fi