Jump to content

Manual:DatabaseUpdater.php

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Manual:DatabaseUpdater.php and the translation is 50% complete.

DatabaseUpdater は、データベースの更新処理 (例: テーブル、フィールド、インデックスの、追加、変更、削除) を扱うクラスです。 MysqlUpdater.php , PostgresUpdater.php , and SqliteUpdater.php extend this class, and all of those files (as well as the tables.sql files for the various database types) potentially need to be revised when a core schema change is made. Extensions usually change the schema by means of LoadExtensionSchemaUpdates hook functions. Either way, SQL patch file(s) need to be created.

関数

  • addExtensionField( $tableName, $columnName, $sqlPath )
  • addExtensionIndex( $tableName, $indexName, $sqlPath )
  • addExtensionTable( $tableName, $sqlPath )
  • addExtensionUpdate( array $update )
  • addPostDatabaseUpdateMaintenance( $class )
  • doUpdates( array $what = [ 'core', 'extensions', 'stats' ] )
  • dropExtensionField( $tableName, $columnName, $sqlPath )
  • dropExtensionIndex( $tableName, $indexName, $sqlPath )
  • dropExtensionTable( $tableName, $sqlPath = false )
  • getDB()
  • getPostDatabaseUpdateMaintenance()
  • getSchemaVars()
  • insertUpdateRow( $key, $val = null )
  • modifyExtensionField( $tableName, $fieldName, $sqlPath )
  • modifyExtensionTable( $tableName, $sqlPath )
  • output( $str )
  • patchPath( IDatabase $db, $patch )
  • purgeCache()
  • renameExtensionIndex( $tableName, $oldIndexName, $newIndexName,
  • setAutoExtensionHookContainer( HookContainer $hookContainer )
  • setFileAccess()
  • tableExists( $tableName )
  • updateRowExists( $key )