MediaWiki REL1_40
|
Public Member Functions | |
__construct (IMaintainableDatabase $db, array $tablesToClone, string $newTablePrefix, string $oldTablePrefix=null, bool $dropCurrentTables=true) | |
cloneTableStructure () | |
destroy ( $dropTables=false) | |
Change the prefix back to the original. | |
useTemporaryTables ( $u=true) | |
Set whether to use temporary tables or not. | |
Static Public Member Functions | |
static | changePrefix ( $prefix) |
Change the table prefix on all open DB connections. | |
Definition at line 26 of file CloneDatabase.php.
CloneDatabase::__construct | ( | IMaintainableDatabase | $db, |
array | $tablesToClone, | ||
string | $newTablePrefix, | ||
string | $oldTablePrefix = null, | ||
bool | $dropCurrentTables = true ) |
IMaintainableDatabase | $db | A database subclass |
array | $tablesToClone | An array of tables to clone, unprefixed |
string | $newTablePrefix | Prefix to assign to the tables |
string | null | $oldTablePrefix | Prefix on current tables, if not $wgDBprefix |
bool | $dropCurrentTables |
Definition at line 52 of file CloneDatabase.php.
References Wikimedia\Rdbms\IReadableDatabase\tablePrefix().
|
static |
Change the table prefix on all open DB connections.
string | $prefix |
Definition at line 135 of file CloneDatabase.php.
References $wgDBname, and $wgDBprefix.
CloneDatabase::cloneTableStructure | ( | ) |
Definition at line 77 of file CloneDatabase.php.
References $wgSharedDB, $wgSharedTables, useTemporaryTables(), and wfDebug().
CloneDatabase::destroy | ( | $dropTables = false | ) |
Change the prefix back to the original.
bool | $dropTables | Optionally drop the tables we created |
Definition at line 119 of file CloneDatabase.php.
CloneDatabase::useTemporaryTables | ( | $u = true | ) |
Set whether to use temporary tables or not.
bool | $u | Use temporary tables when cloning the structure |
Definition at line 73 of file CloneDatabase.php.
References useTemporaryTables().
Referenced by cloneTableStructure(), and useTemporaryTables().