X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2FCloneDatabase.php;h=3d22c037ae1c6d32ea9a0abdbbc96e159a097e3a;hb=3df3b575c6617df64ec98533cc7141bd2314e274;hp=809b660a1b41618653c0dcb2105331c87cdb133d;hpb=142e89424ea9c4ee5b87ba8d8e78714bca18c75d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 809b660a1b..3d22c037ae 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -46,8 +46,6 @@ class CloneDatabase { private $db; /** - * Constructor - * * @param IMaintainableDatabase $db A database subclass * @param array $tablesToClone An array of tables to clone, unprefixed * @param string $newTablePrefix Prefix to assign to the tables @@ -93,8 +91,10 @@ class CloneDatabase { self::changePrefix( $this->newTablePrefix ); $newTableName = $this->db->tableName( $tbl, 'raw' ); + // Postgres: Temp tables are automatically deleted upon end of session + // Same Temp table name hides existing table for current session if ( $this->dropCurrentTables - && !in_array( $this->db->getType(), [ 'postgres', 'oracle' ] ) + && !in_array( $this->db->getType(), [ 'oracle' ] ) ) { if ( $oldTableName === $newTableName ) { // Last ditch check to avoid data loss