2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#90] Deleting shared network doesn't delete subnet anymore

This commit is contained in:
Tomek Mrugalski 2021-06-09 10:47:38 +02:00
parent c678e855bf
commit e2a7d967e0

View File

@ -206,8 +206,10 @@ CREATE TABLE dhcp6_subnet (
reservations_out_of_pool BOOLEAN DEFAULT NULL,
cache_threshold float DEFAULT NULL,
cache_max_age BIGINT DEFAULT NULL,
CONSTRAINT fk_dhcp6_subnet_shared_network FOREIGN KEY (shared_network_name) REFERENCES dhcp6_shared_network (name),
CONSTRAINT fk_ddns_replace_client_name FOREIGN KEY (ddns_replace_client_name) REFERENCES ddns_replace_client_name_types (type)
CONSTRAINT fk_dhcp6_subnet_shared_network FOREIGN KEY (shared_network_name)
REFERENCES dhcp6_shared_network (name) ON DELETE SET NULL ON UPDATE NO ACTION,
CONSTRAINT fk_ddns_replace_client_name FOREIGN KEY (ddns_replace_client_name)
REFERENCES ddns_replace_client_name_types (type)
);
CREATE TRIGGER dhcp6_subnet_modification_ts_update
@ -217,12 +219,6 @@ CREATE TRIGGER dhcp6_subnet_modification_ts_update
CREATE INDEX dhcp6_subnet_idx1 ON dhcp6_subnet (modification_ts);
CREATE INDEX dhcp6_subnet_idx2 ON dhcp6_subnet (shared_network_name);
-- TODO: on delete set up dhcp6_subnet_shared_network to NULL
-- the MySQL equivalent is: CONSTRAINT `fk_dhcp6_subnet_shared_network` FOREIGN KEY (`shared_network_name`) REFERENCES
-- `dhcp6_shared_network` (`name`) ON DELETE SET NULL ON UPDATE NO ACTION
-- Create a table that holds all address pools in IPv6.
@ -545,8 +541,10 @@ CREATE TABLE dhcp4_subnet (
reservations_out_of_pool BOOLEAN DEFAULT NULL,
cache_threshold float DEFAULT NULL,
cache_max_age BIGINT DEFAULT NULL,
CONSTRAINT fk_dhcp4_subnet_shared_network FOREIGN KEY (shared_network_name) REFERENCES dhcp4_shared_network (name),
CONSTRAINT fk_ddns_replace_client_name FOREIGN KEY (ddns_replace_client_name) REFERENCES ddns_replace_client_name_types (type)
CONSTRAINT fk_dhcp4_subnet_shared_network FOREIGN KEY (shared_network_name)
REFERENCES dhcp4_shared_network (name) ON DELETE SET NULL ON UPDATE NO ACTION,
CONSTRAINT fk_ddns_replace_client_name FOREIGN KEY (ddns_replace_client_name)
REFERENCES ddns_replace_client_name_types (type)
);
CREATE TRIGGER dhcp4_subnet_modification_ts_update