From: Thomas Markwalder Date: Fri, 2 Feb 2018 14:02:10 +0000 (-0500) Subject: [5522] Corrected copy-paste error in postgresql create and upgrade scripts X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aee78bca0d598c6364b56a2bd6f1a72581cbc9da;p=thirdparty%2Fkea.git [5522] Corrected copy-paste error in postgresql create and upgrade scripts Both scripts altered the host table dhcp4_subnet_id column twice rather than dhcp6_subnet_id column. --- diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index af1e27bf3c..819af77496 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -532,7 +532,7 @@ UPDATE schema_version -- Change subnet ID columns type to BIGINT to match lease4/6 tables ALTER TABLE hosts ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; -ALTER TABLE hosts ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; +ALTER TABLE hosts ALTER COLUMN dhcp6_subnet_id TYPE BIGINT; ALTER TABLE dhcp4_options ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; ALTER TABLE dhcp6_options ALTER COLUMN dhcp6_subnet_id TYPE BIGINT; diff --git a/src/share/database/scripts/pgsql/upgrade_3.2_to_3.3.sh.in b/src/share/database/scripts/pgsql/upgrade_3.2_to_3.3.sh.in index 3b5fa604cf..b8c7248016 100644 --- a/src/share/database/scripts/pgsql/upgrade_3.2_to_3.3.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_3.2_to_3.3.sh.in @@ -21,7 +21,7 @@ START TRANSACTION; -- Change subnet ID columns type to BIGINT to match lease4/6 tables ALTER TABLE hosts ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; -ALTER TABLE hosts ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; +ALTER TABLE hosts ALTER COLUMN dhcp6_subnet_id TYPE BIGINT; ALTER TABLE dhcp4_options ALTER COLUMN dhcp4_subnet_id TYPE BIGINT; ALTER TABLE dhcp6_options ALTER COLUMN dhcp6_subnet_id TYPE BIGINT;