From 4b18d98fac0b97f51df92479b59aed127f1fd10c Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Tue, 9 Nov 2021 13:48:48 -0500 Subject: [PATCH] [#2166] Addressed further review comments src/share/database/scripts/pgsql/dhcpdb_drop.pgsql src/share/database/scripts/pgsql/dhcpdb_create.pgsql src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in Changed server_tag parameter size to 64 to match tag column size --- src/share/database/scripts/pgsql/dhcpdb_create.pgsql | 4 ++-- src/share/database/scripts/pgsql/dhcpdb_drop.pgsql | 12 ++++++------ .../database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index 7c87fb02dd..457d5c7450 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -1876,7 +1876,7 @@ LANGUAGE plpgsql; -- being null. -- ----------------------------------------------------- CREATE OR REPLACE FUNCTION createAuditRevisionDHCP4(audit_ts TIMESTAMP WITH TIME ZONE, - server_tag VARCHAR(256), + server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN) RETURNS VOID @@ -2486,7 +2486,7 @@ CREATE INDEX fk_dhcp4_client_class_server_id ON dhcp4_client_class_server (serve -- being null. -- ----------------------------------------------------- CREATE OR REPLACE FUNCTION createAuditRevisionDHCP6(audit_ts TIMESTAMP WITH TIME ZONE, - server_tag VARCHAR(256), + server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN) RETURNS VOID diff --git a/src/share/database/scripts/pgsql/dhcpdb_drop.pgsql b/src/share/database/scripts/pgsql/dhcpdb_drop.pgsql index 6a03dba2e2..8f27256362 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_drop.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_drop.pgsql @@ -31,18 +31,18 @@ DROP FUNCTION IF EXISTS proc_stat_lease6_delete (); DROP TABLE IF EXISTS logs CASCADE; -- config backend procedures for DHCPv6 -DROP FUNCTION IF EXISTS createAuditRevisionDHCP6(audit_ts TIMESTAMP WITH TIME ZONE, server_tag VARCHAR(256), +DROP FUNCTION IF EXISTS createAuditRevisionDHCP6(audit_ts TIMESTAMP WITH TIME ZONE, server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN); DROP FUNCTION IF EXISTS createAuditEntryDHCP6(object_type_val VARCHAR(256), object_id_val BIGINT, modification_type_val VARCHAR(32)); DROP FUNCTION IF EXISTS createOptionAuditDHCP6(modification_type VARCHAR, scope_id SMALLINT, - option_id INT, subnet_id BIGINT, host_id INT, + option_id INT, subnet_id BIGINT, host_id INT, network_name VARCHAR, pool_id BIGINT, pd_pool_id BIGINT, modification_ts TIMESTAMP WITH TIME ZONE); DROP FUNCTION IF EXISTS setClientClass6Order(id BIGINT, follow_class_name VARCHAR(128), old_follow_class_name VARCHAR(128)); DROP FUNCTION IF EXISTS checkDHCPv6ClientClassDependency(class_id BIGINT, dependency_id BIGINT); -DROP FUNCTION IF EXISTS updateDHCPv6ClientClassKnownDependency(client_class_id BIGINT, +DROP FUNCTION IF EXISTS updateDHCPv6ClientClassKnownDependency(client_class_id BIGINT, dependency_id BIGINT); DROP FUNCTION IF EXISTS checkDHCPv6ClientClassKnownDependencyChange(); @@ -95,18 +95,18 @@ DROP FUNCTION IF EXISTS func_dhcp6_subnet_BDEL(); DROP FUNCTION IF EXISTS func_dhcp6_pd_pool_BDEL(); -- config backend procedures for DHCPv4 -DROP FUNCTION IF EXISTS createAuditRevisionDHCP4(audit_ts TIMESTAMP WITH TIME ZONE, server_tag VARCHAR(256), +DROP FUNCTION IF EXISTS createAuditRevisionDHCP4(audit_ts TIMESTAMP WITH TIME ZONE, server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN); DROP FUNCTION IF EXISTS createAuditEntryDHCP4(object_type_val VARCHAR(256), object_id_val BIGINT, modification_type_val VARCHAR(32)); DROP FUNCTION IF EXISTS createOptionAuditDHCP4(modification_type VARCHAR, scope_id SMALLINT, - option_id INT, subnet_id BIGINT, host_id INT, + option_id INT, subnet_id BIGINT, host_id INT, network_name VARCHAR, pool_id BIGINT, modification_ts TIMESTAMP WITH TIME ZONE); DROP FUNCTION IF EXISTS setClientClass4Order(id BIGINT, follow_class_name VARCHAR(128), old_follow_class_name VARCHAR(128)); DROP FUNCTION IF EXISTS checkDHCPv4ClientClassDependency(class_id BIGINT, dependency_id BIGINT); -DROP FUNCTION IF EXISTS updateDHCPv4ClientClassKnownDependency(client_class_id BIGINT, +DROP FUNCTION IF EXISTS updateDHCPv4ClientClassKnownDependency(client_class_id BIGINT, dependency_id BIGINT); DROP FUNCTION IF EXISTS checkDHCPv4ClientClassKnownDependencyChange(); diff --git a/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in b/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in index 35d9305a9b..6749ccd9ba 100644 --- a/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in @@ -883,7 +883,7 @@ LANGUAGE plpgsql; -- being null. -- ----------------------------------------------------- CREATE OR REPLACE FUNCTION createAuditRevisionDHCP4(audit_ts TIMESTAMP WITH TIME ZONE, - server_tag VARCHAR(256), + server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN) RETURNS VOID @@ -1493,7 +1493,7 @@ CREATE INDEX fk_dhcp4_client_class_server_id ON dhcp4_client_class_server (serve -- being null. -- ----------------------------------------------------- CREATE OR REPLACE FUNCTION createAuditRevisionDHCP6(audit_ts TIMESTAMP WITH TIME ZONE, - server_tag VARCHAR(256), + server_tag VARCHAR(64), audit_log_message TEXT, cascade_transaction BOOLEAN) RETURNS VOID