MediaWiki
1.23.2
|
Class for handling database updates. More...
Public Member Functions | |
addExtensionField ( $tableName, $columnName, $sqlPath) | |
addExtensionIndex ( $tableName, $indexName, $sqlPath) | |
addExtensionTable ( $tableName, $sqlPath) | |
Convenience wrapper for addExtensionUpdate() when adding a new table (which is the most common usage of updaters in an extension) More... | |
addExtensionUpdate (array $update) | |
Add a new update coming from an extension. More... | |
addPostDatabaseUpdateMaintenance ( $class) | |
Add a maintenance script to be run after the database updates are complete. More... | |
appendLine ( $line) | |
Append a line to the open filehandle. More... | |
copyFile ( $filename) | |
Append an SQL fragment to the open file handle. More... | |
doUpdates ( $what=array( 'core', 'extensions', 'stats')) | |
Do all the updates. More... | |
dropExtensionField ( $tableName, $columnName, $sqlPath) | |
dropExtensionIndex ( $tableName, $indexName, $sqlPath) | |
Drop an index from an extension table. More... | |
dropExtensionTable ( $tableName, $sqlPath) | |
dropTable ( $table, $patch=false, $fullpath=false) | |
If the specified table exists, drop it, or execute the patch if one is provided. More... | |
getDB () | |
Get a database connection to run updates. More... | |
getPostDatabaseUpdateMaintenance () | |
insertUpdateRow ( $key, $val=null) | |
Helper function: Add a key to the updatelog table Obviously, only use this for updates that occur after the updatelog table was created! More... | |
modifyExtensionField ( $tableName, $fieldName, $sqlPath) | |
modifyField ( $table, $field, $patch, $fullpath=false) | |
Modify an existing field. More... | |
output ( $str) | |
Output some text. More... | |
purgeCache () | |
Purge the objectcache table. More... | |
renameExtensionIndex ( $tableName, $oldIndexName, $newIndexName, $sqlPath, $skipBothIndexExistWarning=false) | |
Rename an index on an extension table. More... | |
tableExists ( $tableName) | |
updateRowExists ( $key) | |
Helper function: check if the given key is present in the updatelog table. More... | |
Static Public Member Functions | |
static | newForDB (&$db, $shared=false, $maintenance=null) |
Protected Member Functions | |
__construct (DatabaseBase &$db, $shared, Maintenance $maintenance=null) | |
Constructor. More... | |
addField ( $table, $field, $patch, $fullpath=false) | |
Add a new field to an existing table. More... | |
addIndex ( $table, $index, $patch, $fullpath=false) | |
Add a new index to an existing table. More... | |
addTable ( $name, $patch, $fullpath=false) | |
Add a new table to the database. More... | |
applyPatch ( $path, $isFullPath=false, $msg=null) | |
Applies a SQL patch. More... | |
canUseNewUpdatelog () | |
Updatelog was changed in 1.17 to have a ul_value column so we can record more information about what kind of updates we've done (that's what this class does). More... | |
checkStats () | |
Check the site_stats table is not properly populated. More... | |
disableContentHandlerUseDB () | |
Turns off content handler fields during parts of the upgrade where they aren't available. More... | |
doActiveUsersInit () | |
Sets the number of active users in the site_stats table. More... | |
doCollationUpdate () | |
Update CategoryLinks collation. More... | |
doLogSearchPopulation () | |
Migrate log params to new table and index for searching. More... | |
doLogUsertextPopulation () | |
Populates the log_user_text field in the logging table. More... | |
doMigrateUserOptions () | |
Migrates user options from the user table blob to user_properties. More... | |
doTable ( $name) | |
Returns whether updates should be executed on the database table $name. More... | |
doUpdateTranscacheField () | |
Updates the timestamps in the transcache table. More... | |
dropField ( $table, $field, $patch, $fullpath=false) | |
Drop a field from an existing table. More... | |
dropIndex ( $table, $index, $patch, $fullpath=false) | |
Drop an index from an existing table. More... | |
enableContentHandlerUseDB () | |
Turns content handler fields back on. More... | |
getCoreUpdateList () | |
Get an array of updates to perform on the database. More... | |
getExtensionUpdates () | |
Get the list of extension-defined updates. More... | |
getOldGlobalUpdates () | |
Before 1.17, we used to handle updates via stuff like $wgExtNewTables/Fields/Indexes. More... | |
rebuildLocalisationCache () | |
Rebuilds the localisation cache. More... | |
renameIndex ( $table, $oldIndex, $newIndex, $skipBothIndexExistWarning, $patch, $fullpath=false) | |
Rename an index from an existing table. More... | |
setAppliedUpdates ( $version, $updates=array()) | |
Protected Attributes | |
DatabaseBase | $db |
Handle to the database subclass. More... | |
array | $extensionUpdates = array() |
List of extension-provided database updates. More... | |
resource | $fileHandle = null |
File handle for SQL output. More... | |
$holdContentHandlerUseDB = true | |
Hold the value of $wgContentHandlerUseDB during the upgrade. More... | |
$postDatabaseUpdateMaintenance | |
Scripts to run after database update Should be a subclass of LoggedUpdateMaintenance. More... | |
$shared = false | |
bool | $skipSchema = false |
Flag specifying whether or not to skip schema (e.g. More... | |
array | $updates = array() |
Array of updates to perform on the database. More... | |
array | $updatesSkipped = array() |
Array of updates that were skipped. More... | |
Private Member Functions | |
initOldGlobals () | |
Initialize all of the old globals. More... | |
loadExtensions () | |
Loads LocalSettings.php, if needed, and initialises everything needed for LoadExtensionSchemaUpdates hook. More... | |
runUpdates (array $updates, $passSelf) | |
Helper function for doUpdates() More... | |
writeSchemaUpdateFile ( $schemaUpdate=array()) | |
Class for handling database updates.
Roughly based off of updaters.inc, with a few improvements :)
Definition at line 33 of file DatabaseUpdater.php.
|
protected |
Constructor.
DatabaseBase | $db | To perform updates on |
bool | $shared | Whether to perform updates on shared tables |
Maintenance | $maintenance | Maintenance object which created us |
Definition at line 97 of file DatabaseUpdater.php.
References $db, $maintenance, $shared, array(), DBO_DDLMODE, initOldGlobals(), loadExtensions(), Maintenance\setDB(), DatabaseBase\setFlag(), and wfRunHooks().
DatabaseUpdater::addExtensionField | ( | $tableName, | |
$columnName, | |||
$sqlPath | |||
) |
$tableName | string |
$columnName | string |
$sqlPath | string |
Definition at line 245 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::addExtensionIndex | ( | $tableName, | |
$indexName, | |||
$sqlPath | |||
) |
$tableName | string |
$indexName | string |
$sqlPath | string |
Definition at line 233 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::addExtensionTable | ( | $tableName, | |
$sqlPath | |||
) |
Convenience wrapper for addExtensionUpdate() when adding a new table (which is the most common usage of updaters in an extension)
string | $tableName | Name of table to create |
string | $sqlPath | Full path to the schema file |
Definition at line 222 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::addExtensionUpdate | ( | array | $update | ) |
Add a new update coming from an extension.
This should be called by extensions while executing the LoadExtensionSchemaUpdates hook.
array | $update | The update to run. Format is the following: first item is the callback function, it also can be a simple string with the name of a function in this class, following elements are parameters to the function. Note that callback functions will receive this object as first parameter. |
Definition at line 209 of file DatabaseUpdater.php.
|
protected |
Add a new field to an existing table.
string | $table | Name of the table to modify |
string | $field | Name of the new field |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Definition at line 679 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
|
protected |
Add a new index to an existing table.
string | $table | Name of the table to modify |
string | $index | Name of the new index |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Definition at line 704 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
DatabaseUpdater::addPostDatabaseUpdateMaintenance | ( | $class | ) |
Add a maintenance script to be run after the database updates are complete.
Script should subclass LoggedUpdateMaintenance
string | $class | Name of a Maintenance subclass |
Definition at line 342 of file DatabaseUpdater.php.
|
protected |
Add a new table to the database.
string | $name | Name of the new table |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Definition at line 656 of file DatabaseUpdater.php.
References $name, applyPatch(), doTable(), and output().
DatabaseUpdater::appendLine | ( | $line | ) |
Append a line to the open filehandle.
The line is assumed to be a complete SQL statement.
This is used as a callback for for sourceLine().
string | $line | Text to append to the file |
MWException |
Definition at line 606 of file DatabaseUpdater.php.
References $line.
|
protected |
Applies a SQL patch.
string | $path | Path to the patch file |
$isFullPath | Boolean Whether to treat $path as a relative or not | |
string | $msg | Description of the patch |
Definition at line 623 of file DatabaseUpdater.php.
References $path, copyFile(), and output().
Referenced by addField(), addIndex(), PostgresUpdater\addInterwikiType(), PostgresUpdater\addPgExtIndex(), addTable(), MysqlUpdater\checkBin(), PostgresUpdater\checkIwlPrefix(), PostgresUpdater\checkPageDeletedTrigger(), PostgresUpdater\checkRevUserFkey(), PostgresUpdater\convertArchive2(), MysqlUpdater\doBacklinkingIndicesUpdate(), MysqlUpdater\doCategorylinksIndicesUpdate(), MysqlUpdater\doClFieldsUpdate(), SqliteUpdater\doEnableProfiling(), MysqlUpdater\doEnableProfiling(), MysqlUpdater\doFilearchiveIndicesUpdate(), MysqlUpdater\doFixAncientImagelinks(), OracleUpdater\doFKRenameDeferr(), OracleUpdater\doFunctions17(), MysqlUpdater\doIndexUpdate(), MysqlUpdater\doInterwikiUpdate(), MysqlUpdater\doIwlinksIndexNonUnique(), MysqlUpdater\doLangLinksLengthUpdate(), MysqlUpdater\doMaybeProfilingMemoryUpdate(), OracleUpdater\doNamespaceDefaults(), MysqlUpdater\doPagelinksUpdate(), OracleUpdater\doPageRestrictionsPKUKFix(), OracleUpdater\doRebuildDuplicateFunction(), OracleUpdater\doRecentchangesFK2Cascade(), OracleUpdater\doRemoveNotNullEmptyDefaults(), OracleUpdater\doRemoveNotNullEmptyDefaults2(), MysqlUpdater\doRestrictionsUpdate(), OracleUpdater\doSchemaUpgrade17(), MysqlUpdater\doTemplatelinksUpdate(), MysqlUpdater\doUniquePlTlIl(), MysqlUpdater\doUpdateMimeMinorField(), doUpdateTranscacheField(), MysqlUpdater\doUserGroupsUpdate(), MysqlUpdater\doUserNewTalkTimestampNotNull(), MysqlUpdater\doUserUniqueUpdate(), MysqlUpdater\doWatchlistNull(), dropField(), dropIndex(), dropTable(), modifyField(), renameIndex(), PostgresUpdater\renameTable(), SqliteUpdater\sqliteInitialIndexes(), SqliteUpdater\sqliteSetupSearchindex(), and PostgresUpdater\tsearchFixes().
|
protected |
Updatelog was changed in 1.17 to have a ul_value column so we can record more information about what kind of updates we've done (that's what this class does).
Pre-1.17 wikis won't have this column, and really old wikis might not even have updatelog at all
Definition at line 506 of file DatabaseUpdater.php.
Referenced by insertUpdateRow(), and setAppliedUpdates().
|
protected |
Check the site_stats table is not properly populated.
Definition at line 904 of file DatabaseUpdater.php.
References array(), SiteStatsInit\doAllAndCommit(), and output().
Referenced by doUpdates().
DatabaseUpdater::copyFile | ( | $filename | ) |
Append an SQL fragment to the open file handle.
string | $filename | File name to open |
Definition at line 590 of file DatabaseUpdater.php.
References array().
Referenced by applyPatch().
|
protected |
Turns off content handler fields during parts of the upgrade where they aren't available.
Definition at line 1040 of file DatabaseUpdater.php.
|
protected |
Sets the number of active users in the site_stats table.
Definition at line 924 of file DatabaseUpdater.php.
|
protected |
Update CategoryLinks collation.
Definition at line 989 of file DatabaseUpdater.php.
|
protected |
Migrate log params to new table and index for searching.
Definition at line 959 of file DatabaseUpdater.php.
References output(), and updateRowExists().
|
protected |
Populates the log_user_text field in the logging table.
Definition at line 942 of file DatabaseUpdater.php.
References output(), and updateRowExists().
|
protected |
Migrates user options from the user table blob to user_properties.
Definition at line 1014 of file DatabaseUpdater.php.
References output().
|
protected |
Returns whether updates should be executed on the database table $name.
Updates will be prevented if the table is a shared table and it is not specified to run updates on shared tables.
string | $name | Table name |
Definition at line 519 of file DatabaseUpdater.php.
Referenced by addField(), addIndex(), addTable(), MysqlUpdater\checkBin(), MysqlUpdater\doEnableProfiling(), MysqlUpdater\doInterwikiUpdate(), MysqlUpdater\doMaybeProfilingMemoryUpdate(), MysqlUpdater\doUserGroupsUpdate(), MysqlUpdater\doUserNewTalkTimestampNotNull(), MysqlUpdater\doUserUniqueUpdate(), dropField(), dropIndex(), dropTable(), MysqlUpdater\indexHasField(), modifyField(), and renameIndex().
Do all the updates.
array | $what | What updates to perform |
Reimplemented in OracleUpdater.
Definition at line 388 of file DatabaseUpdater.php.
References checkStats(), getCoreUpdateList(), getExtensionUpdates(), getOldGlobalUpdates(), global, runUpdates(), setAppliedUpdates(), updates(), and writeSchemaUpdateFile().
|
protected |
Updates the timestamps in the transcache table.
Definition at line 975 of file DatabaseUpdater.php.
References applyPatch(), output(), and updateRowExists().
DatabaseUpdater::dropExtensionField | ( | $tableName, | |
$columnName, | |||
$sqlPath | |||
) |
$tableName | string |
$columnName | string |
$sqlPath | string |
Definition at line 257 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::dropExtensionIndex | ( | $tableName, | |
$indexName, | |||
$sqlPath | |||
) |
Drop an index from an extension table.
string | $tableName | The table name |
string | $indexName | The index name |
string | $sqlPath | The path to the SQL change path |
Definition at line 270 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::dropExtensionTable | ( | $tableName, | |
$sqlPath | |||
) |
$tableName | string |
$sqlPath | string |
Definition at line 281 of file DatabaseUpdater.php.
References array().
|
protected |
Drop a field from an existing table.
string | $table | Name of the table to modify |
string | $field | Name of the old field |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Definition at line 729 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
|
protected |
Drop an index from an existing table.
string | $table | Name of the table to modify |
string | $index | Name of the index |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Reimplemented in PostgresUpdater.
Definition at line 752 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
If the specified table exists, drop it, or execute the patch if one is provided.
Public
string | $table | Table to drop. |
string | bool | $patch | String of patch file that will drop the table. Default: false. |
bool | $fullpath | Whether $patch is a full path. Default: false. |
Definition at line 832 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
|
protected |
Turns content handler fields back on.
Definition at line 1053 of file DatabaseUpdater.php.
References $holdContentHandlerUseDB, global, and output().
|
abstractprotected |
Get an array of updates to perform on the database.
Should return a multi-dimensional array. The main key is the MediaWiki version (1.12, 1.13...) with the values being arrays of updates, identical to how updaters.inc did it (for now)
Reimplemented in PostgresUpdater, OracleUpdater, MssqlUpdater, SqliteUpdater, and MysqlUpdater.
Referenced by doUpdates().
DatabaseUpdater::getDB | ( | ) |
Get a database connection to run updates.
Definition at line 175 of file DatabaseUpdater.php.
References $db.
|
protected |
Get the list of extension-defined updates.
Definition at line 351 of file DatabaseUpdater.php.
References $extensionUpdates.
Referenced by doUpdates().
|
protected |
Before 1.17, we used to handle updates via stuff like $wgExtNewTables/Fields/Indexes.
This is nasty :) We refactored a lot of this in 1.17 but we want to remain back-compatible for a while. So load up these old global-based things into our update list.
Reimplemented in PostgresUpdater.
Definition at line 539 of file DatabaseUpdater.php.
References $updates, array(), as, and global.
Referenced by doUpdates().
DatabaseUpdater::getPostDatabaseUpdateMaintenance | ( | ) |
Definition at line 360 of file DatabaseUpdater.php.
References $postDatabaseUpdateMaintenance.
|
private |
Initialize all of the old globals.
One day this should all become something much nicer
Definition at line 117 of file DatabaseUpdater.php.
References array(), and global.
Referenced by __construct().
DatabaseUpdater::insertUpdateRow | ( | $key, | |
$val = null |
|||
) |
Helper function: Add a key to the updatelog table Obviously, only use this for updates that occur after the updatelog table was created!
string | $key | Name of key to insert |
string | $val | [optional] Value to insert along with the key |
Definition at line 488 of file DatabaseUpdater.php.
References array(), canUseNewUpdatelog(), and DBO_DDLMODE.
Referenced by modifyField().
|
private |
Loads LocalSettings.php, if needed, and initialises everything needed for LoadExtensionSchemaUpdates hook.
Definition at line 135 of file DatabaseUpdater.php.
References $vars, $wgAutoloadClasses, $wgHooks, Installer\getExistingLocalSettings(), and global.
Referenced by __construct().
DatabaseUpdater::modifyExtensionField | ( | $tableName, | |
$fieldName, | |||
$sqlPath | |||
) |
string | $tableName | The table name |
string | $fieldName | The field to be modified |
string | $sqlPath | The path to the SQL change path |
Definition at line 318 of file DatabaseUpdater.php.
References array().
DatabaseUpdater::modifyField | ( | $table, | |
$field, | |||
$patch, | |||
$fullpath = false |
|||
) |
Modify an existing field.
string | $table | Name of the table to which the field belongs |
string | $field | Name of the field to modify |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Definition at line 863 of file DatabaseUpdater.php.
References applyPatch(), doTable(), insertUpdateRow(), output(), and updateRowExists().
|
static |
DatabaseBase | $db | |
bool | $shared | |
Maintenance | $maintenance |
MWException |
Definition at line 159 of file DatabaseUpdater.php.
References $db, $maintenance, $shared, $type, Installer\getDBTypes(), and DatabaseType\getType().
Referenced by DatabaseInstaller\createExtensionTables(), DatabaseInstaller\doUpgrade(), and DatabaseSqliteTest\prepareDB().
DatabaseUpdater::output | ( | $str | ) |
Output some text.
If we're running from web, escape the text first.
string | $str | Text to output |
Definition at line 184 of file DatabaseUpdater.php.
References $wgCommandLineMode, and global.
Referenced by addField(), addIndex(), PostgresUpdater\addPgExtIndex(), PostgresUpdater\addPgField(), PostgresUpdater\addPgIndex(), PostgresUpdater\addSequence(), addTable(), applyPatch(), PostgresUpdater\changeField(), PostgresUpdater\changeFieldPurgeTable(), PostgresUpdater\changeFkeyDeferrable(), PostgresUpdater\changeNullableField(), MysqlUpdater\checkBin(), PostgresUpdater\checkIndex(), PostgresUpdater\checkOiDeleted(), PostgresUpdater\checkOiNameConstraint(), PostgresUpdater\checkPageDeletedTrigger(), PostgresUpdater\checkRevUserFkey(), checkStats(), PostgresUpdater\convertArchive2(), disableContentHandlerUseDB(), doActiveUsersInit(), MysqlUpdater\doCategoryPopulation(), MysqlUpdater\doClFieldsUpdate(), doCollationUpdate(), MysqlUpdater\doFixAncientImagelinks(), MysqlUpdater\doIndexUpdate(), OracleUpdater\doInsertPage0(), MysqlUpdater\doInterwikiUpdate(), MysqlUpdater\doIwlinksIndexNonUnique(), MysqlUpdater\doLangLinksLengthUpdate(), doLogSearchPopulation(), doLogUsertextPopulation(), MysqlUpdater\doMaybeProfilingMemoryUpdate(), doMigrateUserOptions(), MysqlUpdater\doNamespaceSize(), MysqlUpdater\doPagelinksUpdate(), MysqlUpdater\doPageRandomUpdate(), OracleUpdater\doPageRestrictionsPKUKFix(), MysqlUpdater\doPopulateParentId(), MysqlUpdater\doRestrictionsUpdate(), MysqlUpdater\doSchemaRestructuring(), MysqlUpdater\doTemplatelinksUpdate(), MysqlUpdater\doUniquePlTlIl(), MysqlUpdater\doUpdateMimeMinorField(), doUpdateTranscacheField(), MysqlUpdater\doUserGroupsUpdate(), MysqlUpdater\doUserNewTalkTimestampNotNull(), MysqlUpdater\doUserUniqueUpdate(), MysqlUpdater\doWatchlistNull(), MysqlUpdater\doWatchlistUpdate(), dropField(), dropIndex(), PostgresUpdater\dropIndex(), dropTable(), enableContentHandlerUseDB(), MysqlUpdater\indexHasField(), modifyField(), OracleUpdater\purgeCache(), purgeCache(), rebuildLocalisationCache(), PostgresUpdater\renameIndex(), renameIndex(), PostgresUpdater\renameSequence(), PostgresUpdater\renameTable(), PostgresUpdater\setDefault(), SqliteUpdater\sqliteInitialIndexes(), and SqliteUpdater\sqliteSetupSearchindex().
DatabaseUpdater::purgeCache | ( | ) |
Purge the objectcache table.
Reimplemented in OracleUpdater.
Definition at line 888 of file DatabaseUpdater.php.
References MessageBlobStore\clear(), global, output(), and rebuildLocalisationCache().
|
protected |
Rebuilds the localisation cache.
Definition at line 1025 of file DatabaseUpdater.php.
References output().
Referenced by purgeCache().
DatabaseUpdater::renameExtensionIndex | ( | $tableName, | |
$oldIndexName, | |||
$newIndexName, | |||
$sqlPath, | |||
$skipBothIndexExistWarning = false |
|||
) |
Rename an index on an extension table.
string | $tableName | The table name |
string | $oldIndexName | The old index name |
string | $newIndexName | The new index name |
$skipBothIndexExistWarning | Boolean: Whether to warn if both the old and the new indexes exist. [facultative; by default, false] | |
string | $sqlPath | The path to the SQL change path |
Definition at line 297 of file DatabaseUpdater.php.
References array().
|
protected |
Rename an index from an existing table.
string | $table | Name of the table to modify |
string | $oldIndex | Old name of the index |
string | $newIndex | New name of the index |
$skipBothIndexExistWarning | Boolean: Whether to warn if both the old and the new indexes exist. | |
string | $patch | Path to the patch file |
bool | $fullpath | Whether to treat $patch path as a relative or not |
Reimplemented in PostgresUpdater.
Definition at line 778 of file DatabaseUpdater.php.
References applyPatch(), doTable(), and output().
|
private |
Helper function for doUpdates()
array | $updates | of updates to run |
bool | $passSelf | Whether to pass this object we calling external functions |
Definition at line 424 of file DatabaseUpdater.php.
References $params, $ret, $updates, $updatesSkipped, array(), as, and updates().
Referenced by doUpdates().
|
protected |
string | $version | |
array | $updates |
Definition at line 451 of file DatabaseUpdater.php.
References $updates, array(), canUseNewUpdatelog(), and DBO_DDLMODE.
Referenced by doUpdates().
DatabaseUpdater::tableExists | ( | $tableName | ) |
$tableName | string |
Definition at line 329 of file DatabaseUpdater.php.
DatabaseUpdater::updateRowExists | ( | $key | ) |
Helper function: check if the given key is present in the updatelog table.
Obviously, only use this for updates that occur after the updatelog table was created!
string | $key | Name of the key to check for |
Definition at line 470 of file DatabaseUpdater.php.
References array().
Referenced by MysqlUpdater\doCategoryPopulation(), MysqlUpdater\doClFieldsUpdate(), doLogSearchPopulation(), doLogUsertextPopulation(), MysqlUpdater\doPopulateParentId(), MysqlUpdater\doUpdateMimeMinorField(), doUpdateTranscacheField(), modifyField(), SqliteUpdater\sqliteInitialIndexes(), and SqliteUpdater\sqliteSetupSearchindex().
|
private |
Writes the schema updates desired to a file for the DB Admin to run.
Definition at line 369 of file DatabaseUpdater.php.
References $updates, $updatesSkipped, array(), and as.
Referenced by doUpdates().
|
protected |
Handle to the database subclass.
Definition at line 56 of file DatabaseUpdater.php.
Referenced by __construct(), getDB(), and newForDB().
List of extension-provided database updates.
Definition at line 50 of file DatabaseUpdater.php.
Referenced by getExtensionUpdates().
|
protected |
File handle for SQL output.
Definition at line 77 of file DatabaseUpdater.php.
|
protected |
Hold the value of $wgContentHandlerUseDB during the upgrade.
Definition at line 88 of file DatabaseUpdater.php.
Referenced by enableContentHandlerUseDB().
|
protected |
Scripts to run after database update Should be a subclass of LoggedUpdateMaintenance.
Definition at line 64 of file DatabaseUpdater.php.
Referenced by getPostDatabaseUpdateMaintenance().
|
protected |
Definition at line 58 of file DatabaseUpdater.php.
Referenced by __construct(), and newForDB().
|
protected |
Flag specifying whether or not to skip schema (e.g.
SQL-only) updates.
Definition at line 83 of file DatabaseUpdater.php.
Array of updates to perform on the database.
Definition at line 39 of file DatabaseUpdater.php.
Referenced by PostgresUpdater\getOldGlobalUpdates(), getOldGlobalUpdates(), runUpdates(), setAppliedUpdates(), and writeSchemaUpdateFile().
Array of updates that were skipped.
Definition at line 45 of file DatabaseUpdater.php.
Referenced by runUpdates(), and writeSchemaUpdateFile().