X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fdb%2FCloneDatabase.php;h=3d22c037ae1c6d32ea9a0abdbbc96e159a097e3a;hp=809b660a1b41618653c0dcb2105331c87cdb133d;hb=e7720b8f8e09287384ddee271641d1b1721318bb;hpb=4d609f015dd64528e772bbaa088d378aa26334eb 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