]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3789] Extend the change to upgrade scripts down to Kea 2.6
authorAndrei Pavel <andrei@isc.org>
Wed, 14 May 2025 06:46:40 +0000 (09:46 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 14 May 2025 06:46:40 +0000 (09:46 +0300)
13 files changed:
src/share/database/scripts/mysql/upgrade_022_to_023.sh.in
src/share/database/scripts/mysql/upgrade_023_to_024.sh.in
src/share/database/scripts/mysql/upgrade_024_to_025.sh.in
src/share/database/scripts/mysql/upgrade_025_to_026.sh.in
src/share/database/scripts/mysql/upgrade_026_to_027.sh.in
src/share/database/scripts/mysql/upgrade_027_to_028.sh.in
src/share/database/scripts/mysql/upgrade_028_to_029.sh.in
src/share/database/scripts/pgsql/upgrade_022_to_023.sh.in
src/share/database/scripts/pgsql/upgrade_023_to_024.sh.in
src/share/database/scripts/pgsql/upgrade_024_to_025.sh.in
src/share/database/scripts/pgsql/upgrade_025_to_026.sh.in
src/share/database/scripts/pgsql/upgrade_026_to_027.sh.in
src/share/database/scripts/pgsql/upgrade_027_to_028.sh.in

index 3445aa8c0408656d712354837a9a6aec3dd1e651..a5e0d0d7a89da2c0fc9224645e4ec2ae883f47cd 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index 8f974ec1026b7dd541616c0c8e31d30fbf005af3..9d3337b29f8d7561bb2c784c2f506a36b985b4d3 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index 96a9f332c670aa3568e4335c4757a043d3c13aef..3b0b4ddc64152654eb099c5a40e96d962251b7c2 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index de95d6d59451d89e096f96c64774e1e9f260823d..7b2cb3a10bd84c2bb281bd69df6810ff340bdadf 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index 8ebd55da4028a6d000d0baf279d02092bed03505..7d81b797fef35c24ae1da33ba10af826c95a4781 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index 0d117349002fd20c1270f7ba5d660c75237147a3..cfae3d96530a5cadcb8564f5cbe515796f403e59 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index c8f0b0af1449b2aea11d5c12cacc6b92d590a2b5..1ce4458fe70aa1fb0193e9e775c1a21ac10c7f02 100755 (executable)
@@ -26,10 +26,10 @@ else
     . "@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
index c224c8fba0b06ada523e4e8e415b8f247fab1761..eee3f7249acada06d41542dee679f5ea36095869 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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
 
index de6540674322b6d4f8819c1c46be9931a976a4fe..041b209b82bf15728577ecf51336a167c0f631b4 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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
 
index 1033e5fa16bf292ed9ae3777ab87d4cff4dbd49d..89400318b38dc526be80d4096e261feca5ad19ee 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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
 
index c769b958e589020db5b201ea3841114a753183ba..451f0f1b77711df9040141a8bc159b4ecbb27438 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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
 
index 31a41dfc34b9e5eb032ce47a2dde47478e5dbee2..16e47ff7ad34e77d135fc61584412300fa135f96 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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
 
index be3a235d247930236d43bbc0552d4889241224f5..ceb7d4e0e63d104e23fd8bb4a156a8315313dab7 100755 (executable)
@@ -26,11 +26,11 @@ else
     . "@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