X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2FCloneDatabase.php;h=df5f1151b395fb346e6ab8ed72048c6f5d2f96ae;hb=46b3f75785ae70a11c08368f63aba7802eebc422;hp=d4277245c19c8322e28d9c74ab78669796699944;hpb=be33fee8260d8aae2aa58e485463b25064f94ecb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index d4277245c1..df5f1151b3 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -25,16 +25,16 @@ use Wikimedia\Rdbms\IMaintainableDatabase; class CloneDatabase { /** @var string Table prefix for cloning */ - private $newTablePrefix = ''; + private $newTablePrefix; /** @var string Current table prefix */ - private $oldTablePrefix = ''; + private $oldTablePrefix; /** @var array List of tables to be cloned */ - private $tablesToClone = []; + private $tablesToClone; /** @var bool Should we DROP tables containing the new names? */ - private $dropCurrentTables = true; + private $dropCurrentTables; /** @var bool Whether to use temporary tables or not */ private $useTemporaryTables = true; @@ -93,9 +93,7 @@ class CloneDatabase { // 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(), [ 'oracle' ] ) - ) { + if ( $this->dropCurrentTables ) { if ( $oldTableName === $newTableName ) { // Last ditch check to avoid data loss throw new LogicException( "Not dropping new table, as '$newTableName'" @@ -128,7 +126,7 @@ class CloneDatabase { } /** - * Change the table prefix on all open DB connections/ + * Change the table prefix on all open DB connections * * @param string $prefix * @return void