mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-06 17:05:14 +00:00
[#93,!51] Pool specific options are now managed in MySQL database.
This commit is contained in:
@@ -773,6 +773,14 @@ ALTER TABLE hosts
|
||||
INSERT INTO dhcp_option_scope (scope_id, scope_name)
|
||||
VALUES(4, "shared-network");
|
||||
|
||||
# Add scope for pool specific options.
|
||||
INSERT INTO dhcp_option_scope (scope_id, scope_name)
|
||||
VALUES(5, "pool");
|
||||
|
||||
# Add scope for PD pool specific options.
|
||||
INSERT INTO dhcp_option_scope (scope_id, scope_name)
|
||||
VALUES(6, "pd-pool");
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `modification`
|
||||
-- -----------------------------------------------------
|
||||
@@ -1033,6 +1041,17 @@ CREATE TABLE IF NOT EXISTS dhcp4_options_server (
|
||||
ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# Create trigger which removes pool specific options upon removal of
|
||||
# the pool.
|
||||
DELIMITER $$
|
||||
CREATE TRIGGER dhcp4_pool_BDEL BEFORE DELETE ON dhcp4_pool FOR EACH ROW
|
||||
-- Edit trigger body code below this line. Do not edit lines above this one
|
||||
BEGIN
|
||||
DELETE FROM dhcp4_options WHERE scope_id = 5 AND pool_id = OLD.id;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `dhcp6_server`
|
||||
-- -----------------------------------------------------
|
||||
@@ -1288,6 +1307,17 @@ CREATE TABLE IF NOT EXISTS dhcp6_options_server (
|
||||
ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# Create trigger which removes pool specific options upon removal of
|
||||
# the pool.
|
||||
DELIMITER $$
|
||||
CREATE TRIGGER dhcp6_pool_BDEL BEFORE DELETE ON dhcp6_pool FOR EACH ROW
|
||||
-- Edit trigger body code below this line. Do not edit lines above this one
|
||||
BEGIN
|
||||
DELETE FROM dhcp6_options WHERE scope_id = 5 AND pool_id = OLD.id;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;
|
||||
|
||||
# Update the schema version number
|
||||
UPDATE schema_version
|
||||
SET version = '7', minor = '0';
|
||||
|
Reference in New Issue
Block a user