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:
@@ -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';
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
Reference in New Issue
Block a user