From 892f40ff239e4f8247e86391aad9a989070ef10a Mon Sep 17 00:00:00 2001 From: alpeb Date: Tue, 1 Jun 2004 05:10:43 +0000 Subject: [PATCH] funtion renamecolumn wasn't upgrading the indexes, which avoided changing an indexed column name in postgres --- phpgwapi/inc/class.schema_proc_array.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phpgwapi/inc/class.schema_proc_array.inc.php b/phpgwapi/inc/class.schema_proc_array.inc.php index d610d13653..9eb086077d 100644 --- a/phpgwapi/inc/class.schema_proc_array.inc.php +++ b/phpgwapi/inc/class.schema_proc_array.inc.php @@ -132,6 +132,15 @@ } } + reset($aTables[$sTableName]['ix']); + while(list($key,$sColumnName) = each($aTables[$sTableName]['ix'])) + { + if ($sColumnName == $sOldColumnName) + { + $aTables[$sTableName]['ix'][$key] = $sNewColumnName; + } + } + reset($aTables[$sTableName]['uc']); while(list($key, $sColumnName) = each($aTables[$sTableName]['uc'])) {