Manual:Database layout

(Redirected from Database)
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎dansk • ‎español • ‎français • ‎lietuvių • ‎polski • ‎português • ‎português do Brasil • ‎slovenčina • ‎čeština • ‎русский • ‎українська • ‎العربية • ‎中文 • ‎日本語
Schema redirects here; for information about the Schema: namespace, see Extension:EventLogging , and for the structure of extension.json, see Manual:Extension.json/Schema .


Manual:Contents MediaWiki database layout database layout


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

Version history

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.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
 actor
archive
 blobs  
 bot_passwords
brokenlinks  
 category
 categorylinks
 change_tag
 change_tag_def
 comment
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
 content
 content_models
cur  
 externallinks
 external_user  
 filearchive
 hitcounter  
image
imagelinks
 image_comment_temp  
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
interwiki
 ip_changes
ipblocks
 ipblocks_old  
 ipblocks_restrictions
 iwlinks
 job
 l10n_cache
 langlinks
links  
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
linkscc  
 logging
 log_search
math  
 module_deps
 msg_resource  
 msg_resource_links  
 objectcache
old  
oldimage
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
 page
 pagelinks
 page_props
 page_restrictions
profiling
 protected_titles
 querycache
 querycachetwo
 querycache_info
recentchanges
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
 redirect
 revision
 revision_actor_temp
 revision_comment_temp
searchindex
 sites
 site_identifiers
site_stats
 slots
 slot_roles
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
 tag_summary  
 templatelinks
 text
 trackbacks  
 transcache  
 updatelog
 uploadstash
user
 user_former_groups
 user_groups
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master
user_newtalk
 user_properties
 user_rights  
 valid_tag  
 validate  
watchlist
 watchlist_expiry
1.1 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 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 master

Database management systems

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

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

If using Microsoft SQL Server, see maintenance/mssql/tables.sql. (removed in 1.34)

If using Oracle, see maintenance/oracle/tables.sql. (removed in 1.34)

See also