From 07da314086d6e90b710cc5381216f5f50be0e430 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 16 Sep 2010 11:58:25 +0000 Subject: [PATCH] using own CreateIndex() method in CreateTable(), to deal correctly with size-limited indexes in PostgreSQL --- phpgwapi/inc/class.schema_proc.inc.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index 162a014025..46d8cb176b 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -201,12 +201,7 @@ class schema_proc { continue; // is already created as primary key } - if (is_numeric($name)) - { - $name = $this->_index_name($sTableName,$mFields); - } - $aSql = $this->dict->CreateIndexSQL($name,$sTableName,$mFields,array('UNIQUE')); - if (!($retVal = $this->ExecuteSQLArray($aSql,2,'CreateIndexSql(%1,%2,%3,%4) sql=%5',False,$name,$sTableName,$mFields,array('UNIQUE'),$aSql))) + if (!($retVal = $this->CreateIndex($sTableName,$mFields,true,'',$name))) { return $retVal; } @@ -253,13 +248,7 @@ class schema_proc } } } - - if (is_numeric($name)) - { - $name = $this->_index_name($sTableName,$mFields); - } - $aSql = $this->dict->CreateIndexSQL($name,$sTableName,$mFields,array($options)); - if (!($retVal = $this->ExecuteSQLArray($aSql,2,'CreateIndexSql(%1,%2,%3,%4) sql=%5',False,$name,$sTableName,$mFields,$options,$aSql))) + if (!($retVal = $this->CreateIndex($sTableName,$mFields,false,$options,$name))) { return $retVal; }