forked from extern/egroupware
using own CreateIndex() method in CreateTable(), to deal correctly with size-limited indexes in PostgreSQL
This commit is contained in:
parent
63915fe8ab
commit
07da314086
@ -201,12 +201,7 @@ class schema_proc
|
|||||||
{
|
{
|
||||||
continue; // is already created as primary key
|
continue; // is already created as primary key
|
||||||
}
|
}
|
||||||
if (is_numeric($name))
|
if (!($retVal = $this->CreateIndex($sTableName,$mFields,true,'',$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)))
|
|
||||||
{
|
{
|
||||||
return $retVal;
|
return $retVal;
|
||||||
}
|
}
|
||||||
@ -253,13 +248,7 @@ class schema_proc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!($retVal = $this->CreateIndex($sTableName,$mFields,false,$options,$name)))
|
||||||
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)))
|
|
||||||
{
|
{
|
||||||
return $retVal;
|
return $retVal;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user