From: Thomas Markwalder Date: Wed, 20 Jul 2022 16:00:32 +0000 (-0400) Subject: [#2452] Fixed diff in postgresql scripts X-Git-Tag: Kea-2.2.0~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1449d4971556eeb1cc74dbe58c5b68a2495dcd7d;p=thirdparty%2Fkea.git [#2452] Fixed diff in postgresql scripts --- diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index 7c1ce31870..9187f8710f 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -5612,12 +5612,12 @@ CREATE INDEX key_dhcp6_identifier on hosts (dhcp_identifier, dhcp_identifier_typ -- Modify existing indexes to include subnet_id values of 0, so index is also used -- for global reservations. -DROP INDEX key_dhcp4_identifier_subnet_id; +DROP INDEX IF EXISTS key_dhcp4_identifier_subnet_id; CREATE UNIQUE INDEX key_dhcp4_identifier_subnet_id ON hosts (dhcp_identifier ASC, dhcp_identifier_type ASC, dhcp4_subnet_id ASC) WHERE (dhcp4_subnet_id IS NOT NULL); -DROP INDEX key_dhcp6_identifier_subnet_id; +DROP INDEX IF EXISTS key_dhcp6_identifier_subnet_id; CREATE UNIQUE INDEX key_dhcp6_identifier_subnet_id ON hosts (dhcp_identifier ASC, dhcp_identifier_type ASC, dhcp6_subnet_id ASC) WHERE (dhcp6_subnet_id IS NOT NULL);