]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#90] Created table for DHCPv6 option definitions
authorTomek Mrugalski <tomek@isc.org>
Mon, 31 May 2021 16:20:11 +0000 (18:20 +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 6fc264e753fbbce55802cb7d50b325d5faab2887..84d7504fb8b7f11c1fc22be77ff09f30a6d9178d 100644 (file)
@@ -371,6 +371,24 @@ CREATE INDEX dhcp6_options_server_server_id on dhcp6_options_server(server_id);
 CREATE INDEX dhcp6_options_server_modification_ts on dhcp6_options_server(modification_ts);
 
 
+
+-- This table is for storing IPv6 option definitions
+CREATE TABLE dhcp6_option_def (
+  id SERIAL PRIMARY KEY UNIQUE NOT NULL,
+  code SMALLINT NOT NULL,
+  name VARCHAR(128) NOT NULL,
+  space VARCHAR(128) NOT NULL,
+  type SMALLINT NOT NULL,
+  modification_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  is_array BOOLEAN NOT NULL,
+  encapsulate VARCHAR(128) NOT NULL,
+  record_types VARCHAR DEFAULT NULL,
+  user_context JSON DEFAULT NULL
+);
+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);
+
+
 -- Update the schema version number
 UPDATE schema_version
     SET version = '7', minor = '0';