mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[#90] Added dhcp4_option_def_server
This commit is contained in:
@@ -602,6 +602,19 @@ CREATE TRIGGER dhcp4_option_def_modification_ts_update
|
|||||||
AFTER UPDATE ON dhcp4_option_def
|
AFTER UPDATE ON dhcp4_option_def
|
||||||
FOR EACH ROW EXECUTE PROCEDURE modification_ts_update();
|
FOR EACH ROW EXECUTE PROCEDURE modification_ts_update();
|
||||||
|
|
||||||
|
|
||||||
|
-- and another table for storing relationship between option definitions and servers.
|
||||||
|
CREATE TABLE dhcp4_option_def_server (
|
||||||
|
option_def_id BIGINT NOT NULL REFERENCES dhcp6_option_def (id) ON DELETE CASCADE ON UPDATE NO ACTION,
|
||||||
|
server_id BIGINT NOT NULL REFERENCES dhcp4_server (id) ON DELETE CASCADE ON UPDATE NO ACTION,
|
||||||
|
modification_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (option_def_id, server_id)
|
||||||
|
);
|
||||||
|
CREATE TRIGGER dhcp4_option_def_server_modification_ts_update
|
||||||
|
AFTER UPDATE ON dhcp4_option_def_server
|
||||||
|
FOR EACH ROW EXECUTE PROCEDURE modification_ts_update();
|
||||||
|
|
||||||
|
|
||||||
-- Update the schema version number
|
-- Update the schema version number
|
||||||
UPDATE schema_version
|
UPDATE schema_version
|
||||||
SET version = '7', minor = '0';
|
SET version = '7', minor = '0';
|
||||||
|
Reference in New Issue
Block a user