2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[#3789] Check only major version in upgrade scripts to allow for intermediary backported schema changes

This commit is contained in:
Andrei Pavel 2025-05-14 09:32:39 +03:00
parent e8e51c4235
commit f5bcf91497
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
2 changed files with 9 additions and 9 deletions

View File

@ -26,10 +26,10 @@ else
. "@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

View File

@ -26,11 +26,11 @@ else
. "@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