mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 13:22:06 +02:00
fix some scrutinizer "bugs"
This commit is contained in:
parent
e6c2f04dda
commit
b103dd23a6
@ -348,7 +348,7 @@ class Schema
|
|||||||
{
|
{
|
||||||
unset($aTableDef); // not used, but required by function signature
|
unset($aTableDef); // not used, but required by function signature
|
||||||
|
|
||||||
$table_def = $this->GetTableDefinition($sTableName);
|
if (!($table_def = $this->GetTableDefinition($sTableName))) return 0;
|
||||||
unset($table_def['fd'][$sColumnName]);
|
unset($table_def['fd'][$sColumnName]);
|
||||||
|
|
||||||
$aSql = $this->dict->DropColumnSql($sTableName,$sColumnName,$ado_table=$this->_egw2adodb_columndef($table_def));
|
$aSql = $this->dict->DropColumnSql($sTableName,$sColumnName,$ado_table=$this->_egw2adodb_columndef($table_def));
|
||||||
@ -369,7 +369,7 @@ class Schema
|
|||||||
// we create a new table, copy the content and drop the old one
|
// we create a new table, copy the content and drop the old one
|
||||||
if ($this->sType == 'pgsql')
|
if ($this->sType == 'pgsql')
|
||||||
{
|
{
|
||||||
$table_def = $this->GetTableDefinition($sOldTableName);
|
if (!($table_def = $this->GetTableDefinition($sOldTableName))) return 0;
|
||||||
|
|
||||||
if ($this->_PostgresHasOldSequence($sOldTableName,True) || count($table_def['pk']) ||
|
if ($this->_PostgresHasOldSequence($sOldTableName,True) || count($table_def['pk']) ||
|
||||||
count($table_def['ix']) || count($table_def['uc']))
|
count($table_def['ix']) || count($table_def['uc']))
|
||||||
@ -447,7 +447,7 @@ class Schema
|
|||||||
*/
|
*/
|
||||||
function AlterColumn($sTableName, $sColumnName, $aColumnDef)
|
function AlterColumn($sTableName, $sColumnName, $aColumnDef)
|
||||||
{
|
{
|
||||||
$table_def = $this->GetTableDefinition($sTableName);
|
if (!($table_def = $this->GetTableDefinition($sTableName))) return 0;
|
||||||
|
|
||||||
// PostgreSQL: varchar or ascii column shortened, use substring to avoid error if current content is to long
|
// PostgreSQL: varchar or ascii column shortened, use substring to avoid error if current content is to long
|
||||||
if($this->sType == 'pgsql' && in_array($table_def['fd'][$sColumnName]['type'], array('varchar', 'ascii')) &&
|
if($this->sType == 'pgsql' && in_array($table_def['fd'][$sColumnName]['type'], array('varchar', 'ascii')) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user