]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#90] dhcp6_option_def_server table added
authorTomek Mrugalski <tomek@isc.org>
Mon, 31 May 2021 16:24:09 +0000 (18:24 +0200)
committerTomek Mrugalski <tomek@isc.org>
Thu, 28 Oct 2021 10:31:40 +0000 (12:31 +0200)
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in

index 84d7504fb8b7f11c1fc22be77ff09f30a6d9178d..4df69ffe6813181dc68424cc657c6c3cb86586e0 100644 (file)
@@ -389,6 +389,15 @@ CREATE INDEX dhcp6_option_def_modification on dhcp6_option_def(modification_ts);
 CREATE INDEX dhcp6_option_def_code_space on dhcp6_option_def(code, space);
 
 
+-- and another table for storing relationship between option definitions and servers.
+CREATE TABLE dhcp6_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 dhcp6_server (id) ON DELETE CASCADE ON UPDATE NO ACTION,
+  modification_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (option_def_id, server_id)
+);
+
+
 -- Update the schema version number
 UPDATE schema_version
     SET version = '7', minor = '0';