mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
[392-search-of-reservations-by-hostname] Checkpoint: updated shcemas, todo tests
This commit is contained in:
@@ -15,6 +15,7 @@ sqlscripts_DATA += upgrade_6.0_to_7.0.sh
|
||||
sqlscripts_DATA += upgrade_7.0_to_8.0.sh
|
||||
sqlscripts_DATA += upgrade_8.0_to_8.1.sh
|
||||
sqlscripts_DATA += upgrade_8.1_to_8.2.sh
|
||||
sqlscripts_DATA += upgrade_8.2_to_9.0.sh
|
||||
sqlscripts_DATA += wipe_data.sh
|
||||
|
||||
DISTCLEANFILES = upgrade_1.0_to_2.0.sh
|
||||
@@ -28,6 +29,7 @@ DISTCLEANFILES += upgrade_5.2_to_6.0.sh
|
||||
DISTCLEANFILES += upgrade_6.0_to_7.0.sh
|
||||
DISTCLEANFILES += upgrade_7.0_to_8.0.sh
|
||||
DISTCLEANFILES += upgrade_8.1_to_8.2.sh
|
||||
DISTCLEANFILES += upgrade_8.2_to_9.0.sh
|
||||
DISTCLEANFILES += wipe_data.sh
|
||||
|
||||
EXTRA_DIST = ${sqlscripts_DATA}
|
||||
|
@@ -2782,6 +2782,15 @@ SET version = '8', minor = '2';
|
||||
|
||||
# This line concludes database upgrade to version 8.2.
|
||||
|
||||
# Create hostname index for host reservations
|
||||
CREATE INDEX hosts_by_hostname ON hosts (hostname);
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '9', minor = '0';
|
||||
|
||||
# This line concludes database upgrade to version 9.0.
|
||||
|
||||
|
||||
# Notes:
|
||||
#
|
||||
|
34
src/share/database/scripts/mysql/upgrade_8.2_to_9.0.sh.in
Normal file
34
src/share/database/scripts/mysql/upgrade_8.2_to_9.0.sh.in
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
# Include utilities. Use installed version if available and
|
||||
# use build version if it isn't.
|
||||
if [ -e @datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh ]; then
|
||||
. @datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh
|
||||
else
|
||||
. @abs_top_builddir@/src/bin/admin/admin-utils.sh
|
||||
fi
|
||||
|
||||
VERSION=`mysql_version "$@"`
|
||||
|
||||
if [ "$VERSION" != "8.2" ]; then
|
||||
printf "This script upgrades 8.2 to 9.0. Reported version is $VERSION. Skipping upgrade.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mysql "$@" <<EOF
|
||||
|
||||
# Create hostname index for host reservations
|
||||
CREATE INDEX hosts_by_hostname ON hosts (hostname);
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '9', minor = '0';
|
||||
|
||||
# This line concludes database upgrade to version 9.0.
|
||||
|
||||
EOF
|
||||
|
||||
RESULT=$?
|
||||
|
||||
exit $?
|
Reference in New Issue
Block a user