mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
fix for 2 pgSql bugs:
- if a table get droped (eg. uninstall an app) the sequenz got not droped, which leads to complains of pgSql if you tried to reinstall the table/app - _CopyAlteredTable (which is used by AlterColumn) uses a 'SELECT * ' and then the $db->f(0|1|2) which leads to errors when the column-order is not as expected
This commit is contained in:
parent
f9c53875eb
commit
556680d7f8
@ -377,7 +377,7 @@
|
||||
$sSQL .= ',';
|
||||
}
|
||||
|
||||
if ($oProc->m_odb->f($i) != null)
|
||||
if ($oProc->m_odb->f($name) != null)
|
||||
{
|
||||
switch ($arraydef['type'])
|
||||
{
|
||||
@ -387,10 +387,10 @@
|
||||
case 'text':
|
||||
case 'timestamp':
|
||||
case 'varchar':
|
||||
$sSQL .= "'" . $oProc->m_odb->db_addslashes($oProc->m_odb->f($i)) . "'";
|
||||
$sSQL .= "'" . $oProc->m_odb->db_addslashes($oProc->m_odb->f($name)) . "'";
|
||||
break;
|
||||
default:
|
||||
$sSQL .= intval($oProc->m_odb->f($i));
|
||||
$sSQL .= intval($oProc->m_odb->f($name));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -451,7 +451,8 @@
|
||||
{
|
||||
$this->DropSequenceForTable($oProc,$sTableName);
|
||||
|
||||
return !!($oProc->m_odb->query("DROP TABLE " . $sTableName));
|
||||
return $oProc->m_odb->query("DROP TABLE " . $sTableName) &&
|
||||
$this->DropSequenceForTable($oProc, $sTableName);
|
||||
}
|
||||
|
||||
function DropColumn($oProc, &$aTables, $sTableName, $aNewTableDef, $sColumnName, $bCopyData = true)
|
||||
|
Loading…
Reference in New Issue
Block a user