diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index a065923e6d..285b572ea3 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -1004,17 +1004,6 @@ ALTER TABLE dhcp4_options ADD COLUMN dhcp4_pool_id BIGINT(20) UNSIGNED DEFAULT NULL, ADD COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; -# Add configuration backend specific constraints. -ALTER TABLE dhcp4_options - ADD CONSTRAINT fk_dhcp4_option_pool_id FOREIGN KEY (dhcp4_pool_id) - REFERENCES dhcp4_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp4_option_shared_network_name FOREIGN KEY (dhcp4_shared_network_name) - REFERENCES dhcp4_shared_network (name) - ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp4_option_subnet_id FOREIGN KEY (dhcp4_subnet_id) - REFERENCES dhcp4_subnet (subnet_id) - ON DELETE CASCADE ON UPDATE CASCADE; - -- ----------------------------------------------------- -- Table `dhcp4_options_server` -- ----------------------------------------------------- @@ -1263,19 +1252,6 @@ ALTER TABLE dhcp6_options ADD COLUMN dhcp6_pd_pool_id BIGINT(20) UNSIGNED DEFAULT NULL, ADD COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; -# Add configuration backend specific constraints. -ALTER TABLE dhcp6_options - ADD CONSTRAINT fk_dhcp6_option_pd_pool_id FOREIGN KEY (dhcp6_pd_pool_id) - REFERENCES dhcp6_pd_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_pool_id FOREIGN KEY (dhcp6_pool_id) - REFERENCES dhcp6_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_shared_network_name FOREIGN KEY (dhcp6_shared_network_name) - REFERENCES dhcp6_shared_network (name) - ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_subnet_id FOREIGN KEY (dhcp6_subnet_id) - REFERENCES dhcp6_subnet (subnet_id) - ON DELETE CASCADE ON UPDATE CASCADE; - -- ----------------------------------------------------- -- Table `dhcp6_options_server` -- ----------------------------------------------------- diff --git a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in index 7e103673a8..551fa25841 100644 --- a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in @@ -324,17 +324,6 @@ ALTER TABLE dhcp4_options ADD COLUMN dhcp4_pool_id BIGINT(20) UNSIGNED DEFAULT NULL, ADD COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; -# Add configuration backend specific constraints. -ALTER TABLE dhcp4_options - ADD CONSTRAINT fk_dhcp4_option_pool_id FOREIGN KEY (dhcp4_pool_id) - REFERENCES dhcp4_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp4_option_shared_network_name FOREIGN KEY (dhcp4_shared_network_name) - REFERENCES dhcp4_shared_network (name) - ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp4_option_subnet_id FOREIGN KEY (dhcp4_subnet_id) - REFERENCES dhcp4_subnet (subnet_id) - ON DELETE CASCADE ON UPDATE CASCADE; - # Create table dhcp4_options_server CREATE TABLE IF NOT EXISTS dhcp4_options_server ( option_id BIGINT(20) UNSIGNED NOT NULL, @@ -557,19 +546,6 @@ ALTER TABLE dhcp6_options ADD COLUMN dhcp6_pd_pool_id BIGINT(20) UNSIGNED DEFAULT NULL, ADD COLUMN modification_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; -# Add configuration backend specific constraints. -ALTER TABLE dhcp6_options - ADD CONSTRAINT fk_dhcp6_option_pd_pool_id FOREIGN KEY (dhcp6_pd_pool_id) - REFERENCES dhcp6_pd_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_pool_id FOREIGN KEY (dhcp6_pool_id) - REFERENCES dhcp6_pool (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_shared_network_name FOREIGN KEY (dhcp6_shared_network_name) - REFERENCES dhcp6_shared_network (name) - ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT fk_dhcp6_option_subnet_id FOREIGN KEY (dhcp6_subnet_id) - REFERENCES dhcp6_subnet (subnet_id) - ON DELETE CASCADE ON UPDATE CASCADE; - # Create table dhcp6_options_server CREATE TABLE IF NOT EXISTS dhcp6_options_server ( option_id BIGINT(20) UNSIGNED NOT NULL,