diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 9b34c73c65..5247e55630 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -1336,11 +1336,11 @@ SET version = '7', minor = '0'; ALTER TABLE dhcp4_options - MODIFY COLUMN modification_ts TIMESTAMP NOT NULL + MODIFY COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; ALTER TABLE dhcp6_options - MODIFY COLUMN modification_ts TIMESTAMP NOT NULL + MODIFY COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; -- ----------------------------------------------------- @@ -1807,6 +1807,12 @@ ALTER TABLE dhcp6_global_parameter REFERENCES parameter_data_type (id); +-- Rename dhcp6_subnet_id column of dhcp6_pool + +ALTER TABLE dhcp6_pool + CHANGE dhcp6_subnet_id subnet_id INT(10) UNSIGNED NOT NULL; + + # Update the schema version number UPDATE schema_version SET version = '8', minor = '0'; diff --git a/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in b/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in index 3a3446fd6e..070f7547f5 100644 --- a/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in @@ -138,7 +138,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_audit_revision ( -- ----------------------------------------------------- -- Drop columns from the dhcp4_audit table which now -- belong to the dhcp4_audit_revision. --- ----------------------------------------------------- +-- ----------------------------------------------------- ALTER TABLE dhcp4_audit DROP COLUMN modification_ts, DROP COLUMN log_message; @@ -458,7 +458,7 @@ CREATE TRIGGER dhcp4_options_ADEL AFTER DELETE ON dhcp4_options DELIMITER ; -- ----------------------------------------------------- --- Table parameter_data_type +-- Table `parameter_data_type` -- Reflects an enum used by Kea to define supported -- data types for the simple configuration parameters, -- e.g. global parameters used by DHCP servers. @@ -490,6 +490,12 @@ ALTER TABLE dhcp6_global_parameter REFERENCES parameter_data_type (id); +-- Rename dhcp6_subnet_id column of dhcp6_pool + +ALTER TABLE dhcp6_pool + CHANGE dhcp6_subnet_id subnet_id INT(10) UNSIGNED NOT NULL; + + # Update the schema version number UPDATE schema_version SET version = '8', minor = '0';