Manual:Database layout

From MediaWiki.org
Jump to: navigation, search

Other languages:
العربية • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎lietuvių • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎slovenčina • ‎中文
Manual:ContentsManual:Contents MediaWiki database layoutManual:Database layout database layout


(file description page)

Schema redirects here; for information about the Schema: namespace, see Extension:EventLoggingExtension:EventLogging.

The SQL code that creates the MySQLManual:MySQL core tables for any MediaWiki version—with extensive comments—is in the maintenance/tables.sql source file. The most important tables are probably pageManual:page table, revisionManual:revision table, textManual:text table and userManual:user table.

Version history[edit | edit source]

The following table depicts the range of MediaWiki versions over which each table has existed in the schema. Red rows indicate tables that are no longer used by the core nor added by the installer as of a particular version. They might however still be used by extensions. Note, table headings are repeated every 10 rows for clarity.

1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
archiveManual:Archive table
  blobsManual:Blobs table  
brokenlinksManual:Brokenlinks table  
  categoryManual:Category table
  categorylinksManual:Categorylinks table
  change_tagManual:Change tag table
curManual:Cur table  
  externallinksManual:Externallinks table
  external_userManual:External user table  
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
  filearchiveManual:Filearchive table
hitcounterManual:Hitcounter table
imageManual:Image table
imagelinksManual:Imagelinks table
interwikiManual:Interwiki table
  iwlinksManual:Iwlinks table
ipblocksManual:Ipblocks table
  ipblocks_oldManual:Ipblocks old table  
  jobManual:Job table
  l10n_cacheManual:L10n cache table
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
  langlinksManual:Langlinks table
linksManual:Links table  
linksccManual:Linkscc table  
  loggingManual:Logging table
  log_searchManual:Log_search table
mathManual:Math table  
  msg_resourceManual:msg_resource table
  msg_resource_linksManual:msg_resource_links table
  module_depsManual:module_deps table
  objectcacheManual:Objectcache table
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
oldManual:Old table  
oldimageManual:Oldimage table
  pageManual:Page table
  pagelinksManual:Pagelinks table
  page_props
  page_restrictions
  protected_titles
  querycache
  querycachetwo
  querycache_info
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
  recentchanges
  redirect
  revision
searchindex
  sites
site_stats
  tag_summary
  templatelinks
  text
  trackbacks  
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
  transcache
  updatelog
  uploadstash
user
  user_former_groups
  user_groups
user_newtalk
  user_properties
  user_rights  
  valid_tag
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master
  validate  
watchlist
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 master

Database management systems[edit | edit source]

See the latest Maria/MySQL-compatible version from Git: maintenance/tables.sql.

If using PostgreSQLManual:PostgreSQL, the file maintenance/postgres/tables.sql should be viewed instead.

If using Microsoft SQL Server, see maintenance/mssql/tables.sql.

If using Oracle, see maintenance/oracle/tables.sql.

See also[edit | edit source]

DatabasesManual:Database layout Engines: MySQLManual:MySQLOracleManual:OraclePostgreSQLManual:PostgreSQLSQLiteManual:SQLite
Technical documentation: SchemaManual:Database layout (tablesCategory:MediaWiki database tables) – API property associationsAPI:Database field and API property associationsField prefixesDatabase field prefixesPrimary key storage in other fieldsManual:Primary key storage in other fieldsWikimedia extension tablesCategory:Wikimedia extension database tables
Configuration: SettingsManual:Configuration_settings#Database_settingsSharingManual:Shared database
Development: AccessManual:Database accessOptimizationDatabase optimizationPolicyDevelopment policy#Database_patchesUpdaterManual:DatabaseUpdater.phpExtension schema updatesManual:Hooks/LoadExtensionSchemaUpdatesPatch fileManual:SQL patch file
Core tables: archivecategorycategorylinkschange_tagconfigexternallinksfilearchivehitcounterimageimagelinksinterwikiiwlinksipblocksjobl10n_cachelanglinkslogginglog_searchmsg_resourcemsg_resource_linksmodule_depsobjectcacheoldimagepagepagelinkspage_propspage_restrictionsprotected_titlesquerycachequerycachetwoquerycache_inforecentchangesredirectrevisionsearchindexsitessite_statstag_summarytemplatelinkstexttranscacheupdateloguploadstashuseruser_former_groupsuser_groupsuser_newtalkuser_propertiesvalid_tagwatchlist