]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3789] Check only major version in upgrade scripts to allow for intermediary backpor...
authorAndrei Pavel <andrei@isc.org>
Wed, 14 May 2025 06:32:39 +0000 (09:32 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 14 May 2025 06:32:39 +0000 (09:32 +0300)
src/share/database/scripts/mysql/upgrade_029_to_030.sh.in
src/share/database/scripts/pgsql/upgrade_028_to_029.sh.in

index e5675cdb182b89bb57ba3037b4ee2f5704e5a92e..55d1977cfee38c081ff802b2b33efdbaae4e5214 100755 (executable)
@@ -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
index 3d6b741e8055ec24df850d2624d7a22f2f1a108d..6b5cdc68e1bed96d0da04109347a7f5ab512d58f 100755 (executable)
@@ -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