|
static | changePrefix (string $prefix) |
| Change the table prefix on all open DB connections.
|
|
Definition at line 26 of file CloneDatabase.php.
◆ __construct()
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 51 of file CloneDatabase.php.
References Wikimedia\Rdbms\IReadableDatabase\tablePrefix().
◆ changePrefix()
static CloneDatabase::changePrefix |
( |
string | $prefix | ) |
|
|
static |
Change the table prefix on all open DB connections.
- Parameters
-
- Returns
- void
Definition at line 132 of file CloneDatabase.php.
◆ cloneTableStructure()
CloneDatabase::cloneTableStructure |
( |
| ) |
|
◆ destroy()
CloneDatabase::destroy |
( |
bool | $dropTables = false | ) |
|
Change the prefix back to the original.
- Parameters
-
bool | $dropTables | Optionally drop the tables we created |
Definition at line 116 of file CloneDatabase.php.
◆ useTemporaryTables()
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 72 of file CloneDatabase.php.
The documentation for this class was generated from the following file: