mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#1710] Added preferred liftime columns to MySQL v6 class
Modified: src/bin/admin/tests/mysql_tests.sh.in src/share/database/scripts/mysql/dhcpdb_create.mysql src/share/database/scripts/mysql/upgrade_010_to_011.sh.in
This commit is contained in:
@@ -847,6 +847,12 @@ insert into hosts(dhcp_identifier, dhcp_identifier_type, dhcp4_subnet_id, ipv4_a
|
||||
count=$(echo "${OUTPUT}" | grep -Fci lease6_by_expire_state)
|
||||
assert_eq 2 "${count}" "lease6_by_expire_state wrong or missing. (expected count %d, actual %d)"
|
||||
|
||||
# Verify preferred lifetime columns exist.
|
||||
qry="select preferred_lifetime,min_preferred_lifetime,max_preferred_lifetime from dhcp6_client_class where name=''"
|
||||
run_command \
|
||||
mysql_execute "${qry}"
|
||||
assert_eq 0 "${EXIT_CODE}" "$qry failed. dhcp6_client_classes preferred lifetime columns missing?"
|
||||
|
||||
# Verify upgraded schema reports version 11.0
|
||||
version=$("${kea_admin}" db-version mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}")
|
||||
assert_str_eq "11.0" "${version}" "Expected kea-admin to return %s, returned value was %s"
|
||||
|
@@ -4032,6 +4032,12 @@ ALTER TABLE lease6
|
||||
ADD CONSTRAINT fk_lease6_state FOREIGN KEY (state)
|
||||
REFERENCES lease_state (state);
|
||||
|
||||
# Added preferred lifetime columns v6 client classes.
|
||||
ALTER TABLE dhcp6_client_class
|
||||
ADD COLUMN preferred_lifetime INT(10) DEFAULT NULL,
|
||||
ADD COLUMN min_preferred_lifetime INT(10) DEFAULT NULL,
|
||||
ADD COLUMN max_preferred_lifetime INT(10) DEFAULT NULL;
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '11', minor = '0';
|
||||
|
@@ -71,6 +71,12 @@ ALTER TABLE lease6
|
||||
ADD CONSTRAINT fk_lease6_state FOREIGN KEY (state)
|
||||
REFERENCES lease_state (state);
|
||||
|
||||
-- Added preferred lifetime columns to v6 client classes
|
||||
ALTER TABLE dhcp6_client_class
|
||||
ADD COLUMN preferred_lifetime INT(10) DEFAULT NULL,
|
||||
ADD COLUMN min_preferred_lifetime INT(10) DEFAULT NULL,
|
||||
ADD COLUMN max_preferred_lifetime INT(10) DEFAULT NULL;
|
||||
|
||||
-- Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '11', minor = '0';
|
||||
|
Reference in New Issue
Block a user