From 2984e4c79e5ba258c0af3ba35c62b95b00f3b469 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 29 Jul 2015 19:01:17 +0000 Subject: [PATCH] drop evtl. existing temp. table eg. from a previous failed upgrade --- phpgwapi/inc/class.schema_proc.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index 877bbe356d..644d56b8c7 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -722,6 +722,11 @@ class schema_proc } else { + // drop evtl. existing temp. table eg. from a previous failed upgrade + if (($tables = $this->db->table_names(true)) && in_array($tmp_name, $tables)) + { + $this->DropTable($tmp_name); + } $Ok = $this->RenameTable($sTableName,$tmp_name); } $Ok = $Ok && $this->CreateTable($sTableName,$aTableDef) &&