MediaWiki
REL1_22
|
Public Member Functions | |
__construct (DatabaseBase $db, array $tablesToClone, $newTablePrefix, $oldTablePrefix= '', $dropCurrentTables=true) | |
Constructor. | |
cloneTableStructure () | |
Clone the table structure. | |
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 | changeDBPrefix ($db, $prefix) |
static | changeLBPrefix ($lb, $prefix) |
static | changePrefix ($prefix) |
Change the table prefix on all open DB connections/. | |
Private Attributes | |
Bool | $dropCurrentTables = true |
Should we DROP tables containing the new names? | |
String | $newTablePrefix = '' |
Table prefix for cloning. | |
String | $oldTablePrefix = '' |
Current table prefix. | |
Array | $tablesToClone = array() |
List of tables to be cloned. | |
Bool | $useTemporaryTables = true |
Whether to use temporary tables or not. |
Definition at line 27 of file CloneDatabase.php.
CloneDatabase::__construct | ( | DatabaseBase $ | db, |
array $ | tablesToClone, | ||
$ | newTablePrefix, | ||
$ | oldTablePrefix = '' , |
||
$ | dropCurrentTables = true |
||
) |
Constructor.
$db | DatabaseBase A database subclass | |
array | $tablesToClone | An array of tables to clone, unprefixed |
string | $newTablePrefix | Prefix to assign to the tables |
string | $oldTablePrefix | Prefix on current tables, if not $wgDBprefix |
$dropCurrentTables | bool |
Definition at line 63 of file CloneDatabase.php.
static CloneDatabase::changeDBPrefix | ( | $ | db, |
$ | prefix | ||
) | [static] |
static CloneDatabase::changeLBPrefix | ( | $ | lb, |
$ | prefix | ||
) | [static] |
static CloneDatabase::changePrefix | ( | $ | prefix | ) | [static] |
Change the table prefix on all open DB connections/.
$prefix |
Definition at line 128 of file CloneDatabase.php.
Referenced by destroy().
Clone the table structure.
Definition at line 84 of file CloneDatabase.php.
CloneDatabase::destroy | ( | $ | dropTables = false | ) |
Change the prefix back to the original.
bool | $dropTables | Optionally drop the tables we created |
Definition at line 112 of file CloneDatabase.php.
References as, and changePrefix().
CloneDatabase::useTemporaryTables | ( | $ | u = true | ) |
Set whether to use temporary tables or not.
bool | $u | Use temporary tables when cloning the structure |
Definition at line 77 of file CloneDatabase.php.
Bool CloneDatabase::$dropCurrentTables = true [private] |
Should we DROP tables containing the new names?
Definition at line 47 of file CloneDatabase.php.
String CloneDatabase::$newTablePrefix = '' [private] |
Table prefix for cloning.
Definition at line 32 of file CloneDatabase.php.
String CloneDatabase::$oldTablePrefix = '' [private] |
Current table prefix.
Definition at line 37 of file CloneDatabase.php.
Array CloneDatabase::$tablesToClone = array() [private] |
List of tables to be cloned.
Definition at line 42 of file CloneDatabase.php.
Bool CloneDatabase::$useTemporaryTables = true [private] |
Whether to use temporary tables or not.
Definition at line 52 of file CloneDatabase.php.