2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[5468] Added lease indexing by subnet identifiers and lease type.

This commit is contained in:
Marcin Siodelski
2018-01-09 15:47:10 +01:00
parent 2732257202
commit a1697ce64b
4 changed files with 26 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -510,6 +510,12 @@ ALTER TABLE hosts ADD COLUMN user_context TEXT NULL;
ALTER TABLE dhcp4_options ADD COLUMN user_context TEXT NULL;
ALTER TABLE dhcp6_options ADD COLUMN user_context TEXT NULL;
# Create index for searching leases by subnet identifier.
CREATE INDEX lease4_by_subnet_id ON lease4 (subnet_id);
# Create for searching leases by subnet identifier and lease type.
CREATE INDEX lease6_by_subnet_id_lease_type ON lease6 (subnet_id, lease_type);
# Update the schema version number
UPDATE schema_version
SET version = '6', minor = '0';

View File

@@ -24,6 +24,12 @@ ALTER TABLE hosts ADD COLUMN user_context TEXT NULL;
ALTER TABLE dhcp4_options ADD COLUMN user_context TEXT NULL;
ALTER TABLE dhcp6_options ADD COLUMN user_context TEXT NULL;
# Create index for searching leases by subnet identifier.
CREATE INDEX lease4_by_subnet_id ON lease4 (subnet_id);
# Create for searching leases by subnet identifier and lease type.
CREATE INDEX lease6_by_subnet_id_lease_type ON lease6 (subnet_id, lease_type);
# Update the schema version number
UPDATE schema_version
SET version = '6', minor = '0';

View File

@@ -1,4 +1,4 @@
-- Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
-- Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -537,6 +537,12 @@ ALTER TABLE hosts ADD COLUMN user_context TEXT;
ALTER TABLE dhcp4_options ADD COLUMN user_context TEXT;
ALTER TABLE dhcp6_options ADD COLUMN user_context TEXT;
-- Create index for searching leases by subnet identifier.
CREATE INDEX lease4_by_subnet_id ON lease4 (subnet_id);
-- Create for searching leases by subnet identifier and lease type.
CREATE INDEX lease6_by_subnet_id_lease_type ON lease6 (subnet_id, lease_type);
-- Set 4.0 schema version.
UPDATE schema_version
SET version = '4', minor = '0';

View File

@@ -26,6 +26,12 @@ ALTER TABLE hosts ADD COLUMN user_context TEXT;
ALTER TABLE dhcp4_options ADD COLUMN user_context TEXT;
ALTER TABLE dhcp6_options ADD COLUMN user_context TEXT;
-- Create index for searching leases by subnet identifier.
CREATE INDEX lease4_by_subnet_id ON lease4 (subnet_id);
-- Create for searching leases by subnet identifier and lease type.
CREATE INDEX lease6_by_subnet_id_lease_type ON lease6 (subnet_id, lease_type);
-- Set 4.0 schema version.
UPDATE schema_version
SET version = '4', minor = '0';