|
| static | changePrefix (string $prefix) |
| | Change the table prefix on all open DB connections.
|
| |
Definition at line 18 of file CloneDatabase.php.
◆ __construct()
| MediaWiki\DB\CloneDatabase::__construct |
( |
IMaintainableDatabase | $db, |
|
|
array | $tablesToClone, |
|
|
string | $newTablePrefix, |
|
|
?string | $oldTablePrefix = null, |
|
|
bool | $dropCurrentTables = true ) |
- Parameters
-
| 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 43 of file CloneDatabase.php.
References Wikimedia\Rdbms\IReadableDatabase\tablePrefix().
◆ changePrefix()
| static MediaWiki\DB\CloneDatabase::changePrefix |
( |
string | $prefix | ) |
|
|
static |
Change the table prefix on all open DB connections.
- Parameters
-
- Returns
- void
Definition at line 124 of file CloneDatabase.php.
◆ cloneTableStructure()
| MediaWiki\DB\CloneDatabase::cloneTableStructure |
( |
| ) |
|
◆ destroy()
| MediaWiki\DB\CloneDatabase::destroy |
( |
bool | $dropTables = false | ) |
|
Change the prefix back to the original.
- Parameters
-
| bool | $dropTables | Optionally drop the tables we created |
Definition at line 108 of file CloneDatabase.php.
◆ useTemporaryTables()
| MediaWiki\DB\CloneDatabase::useTemporaryTables |
( |
bool | $u = true | ) |
|
Set whether to use temporary tables or not.
- Parameters
-
| bool | $u | Use temporary tables when cloning the structure |
Definition at line 64 of file CloneDatabase.php.
The documentation for this class was generated from the following file: