From: Marcin Siodelski Date: Thu, 28 Apr 2016 08:53:00 +0000 (+0200) Subject: [4281] Alterations to MySQL host database schema. X-Git-Tag: trac4106_update_base~7^2~3^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aae4a9db6b1e47c4cb21f634a4adc47632e1828c;p=thirdparty%2Fkea.git [4281] Alterations to MySQL host database schema. - Option code in dhcp6_options table is now SMALLINT. - Subnet ids are now unsigned. --- diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 85b768b0ba..e26445b252 100755 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -436,6 +436,13 @@ ALTER TABLE hosts ADD CONSTRAINT fk_host_identifier_type FOREIGN KEY (dhcp_identifier_type) REFERENCES host_identifier_type (type); +# Store DHCPv6 option code as 16-bit unsigned integer. +ALTER TABLE dhcp6_options MODIFY code SMALLINT UNSIGNED NOT NULL; + +# Subnet identifier is unsigned. +ALTER TABLE dhcp4_options MODIFY dhcp4_subnet_id INT UNSIGNED NULL; +ALTER TABLE dhcp6_options MODIFY dhcp6_subnet_id INT UNSIGNED NULL; + # Update the schema version number UPDATE schema_version SET version = '4', minor = '2';