Manual:DatabaseUpdater.php
From MediaWiki.org
MediaWiki File: DatabaseUpdater.php | |
---|---|
Location: | includes/ |
Source code: | master • 1.23.1 • 1.22.8 |
Classes: | DatabaseUpdater |
DatabaseUpdater is the class for handling database updates (e.g. adding, modifying, and dropping database tables, fields, and indexes). MysqlUpdater.php, PostgresUpdater.php SqliteUpdater.php, MssqlUpdater.php, and OracleUpdater.php extend this class, and all five 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.
Functions[edit | edit source]
- addExtensionField ($tableName, $columnName, $sqlPath)
- addExtensionIndex ($tableName, $indexName, $sqlPath)
- addExtensionTable ($tableName, $sqlPath)
- addExtensionUpdate (array $update)
- addPostDatabaseUpdateMaintenance ($class)
- dropExtensionField ($tableName, $columnName, $sqlPath)
- dropExtensionIndex ($tableName, $indexName, $sqlPath)
- dropExtensionTable ($tableName, $sqlPath)
- dropTable ($table, $patch=false, $fullpath=false)
- getDB ()
- modifyExtensionField ($tableName, $fieldName, $sqlPath)
- modifyField ($table, $field, $patch, $fullpath=false)
![]() |
Engines: MySQL – Oracle – PostgreSQL – SQLite Technical documentation: Schema (tables) – API property associations – Field prefixes – Primary key storage in other fields – Wikimedia extension tables Configuration: Settings – Sharing Development: Access – Optimization – Policy – Updater – Extension schema updates – Patch file Core tables: archive – category – categorylinks – change_tag – config – externallinks – filearchive – hitcounter – image – imagelinks – interwiki – iwlinks – ipblocks – job – l10n_cache – langlinks – logging – log_search – msg_resource – msg_resource_links – module_deps – objectcache – oldimage – page – pagelinks – page_props – page_restrictions – protected_titles – querycache – querycachetwo – querycache_info – recentchanges – redirect – revision – searchindex – sites – site_stats – tag_summary – templatelinks – text – transcache – updatelog – uploadstash – user – user_former_groups – user_groups – user_newtalk – user_properties – valid_tag – watchlist |
---|