|
@@ -406,6 +406,15 @@ CREATE UNIQUE INDEX key_dhcp4_identifier_subnet_id ON hosts (dhcp_identifier ASC
|
|
|
DROP INDEX key_dhcp6_identifier_subnet_id ON hosts;
|
|
|
CREATE UNIQUE INDEX key_dhcp6_identifier_subnet_id ON hosts (dhcp_identifier ASC , dhcp_identifier_type ASC , dhcp6_subnet_id ASC);
|
|
|
|
|
|
+# Create index to search for reservations using IP address and subnet id.
|
|
|
+# This unique index guarantees that there is only one occurence of the
|
|
|
+# particular IPv4 address for a given subnet.
|
|
|
+CREATE UNIQUE INDEX key_dhcp4_ipv4_address_subnet_id ON hosts (ipv4_address ASC , dhcp4_subnet_id ASC);
|
|
|
+
|
|
|
+# Create index to search for reservations using address/prefix and prefix
|
|
|
+# length.
|
|
|
+CREATE INDEX key_dhcp6_address_prefix_len ON ipv6_reservations (address ASC , prefix_len ASC);
|
|
|
+
|
|
|
# Create a table mapping host identifiers to their names. Values in this
|
|
|
# table are used as a foreign key in hosts table to guarantee that only
|
|
|
# identifiers present in host_identifier_type table are used in hosts
|