Manual:Database layout
- Schema redirects here; for information about the Schema: namespace, see Extension:EventLogging .
- Tables redirects here; for information about wikitext table syntax, see Help:Tables .
↑ 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[edit]
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 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | master | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
actor | |||||||||||||||||||||||||||||||
archive | |||||||||||||||||||||||||||||||
blobs | |||||||||||||||||||||||||||||||
bot_passwords | |||||||||||||||||||||||||||||||
broken | |||||||||||||||||||||||||||||||
category | |||||||||||||||||||||||||||||||
category | |||||||||||||||||||||||||||||||
change_ | |||||||||||||||||||||||||||||||
comment | |||||||||||||||||||||||||||||||
content | |||||||||||||||||||||||||||||||
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 | master | |
content_ | |||||||||||||||||||||||||||||||
cur | |||||||||||||||||||||||||||||||
external | |||||||||||||||||||||||||||||||
external_ | |||||||||||||||||||||||||||||||
file | |||||||||||||||||||||||||||||||
hit | |||||||||||||||||||||||||||||||
image | |||||||||||||||||||||||||||||||
image | |||||||||||||||||||||||||||||||
image_ | |||||||||||||||||||||||||||||||
interwiki | |||||||||||||||||||||||||||||||
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 | master | |
ip_changes | |||||||||||||||||||||||||||||||
ipblocks | |||||||||||||||||||||||||||||||
ipblocks_ | |||||||||||||||||||||||||||||||
iwlinks | |||||||||||||||||||||||||||||||
job | |||||||||||||||||||||||||||||||
l10n_ | |||||||||||||||||||||||||||||||
langlinks | |||||||||||||||||||||||||||||||
links | |||||||||||||||||||||||||||||||
linkscc | |||||||||||||||||||||||||||||||
logging | |||||||||||||||||||||||||||||||
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 | master | |
log_ | |||||||||||||||||||||||||||||||
math | |||||||||||||||||||||||||||||||
module_ | |||||||||||||||||||||||||||||||
msg_ | |||||||||||||||||||||||||||||||
msg_ | |||||||||||||||||||||||||||||||
object | |||||||||||||||||||||||||||||||
old | |||||||||||||||||||||||||||||||
oldimage | |||||||||||||||||||||||||||||||
page | |||||||||||||||||||||||||||||||
pagelinks | |||||||||||||||||||||||||||||||
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 | master | |
page_ | |||||||||||||||||||||||||||||||
page_ | |||||||||||||||||||||||||||||||
protected_ | |||||||||||||||||||||||||||||||
querycache | |||||||||||||||||||||||||||||||
querycachetwo | |||||||||||||||||||||||||||||||
querycache_ | |||||||||||||||||||||||||||||||
recentchanges | |||||||||||||||||||||||||||||||
redirect | |||||||||||||||||||||||||||||||
revision | |||||||||||||||||||||||||||||||
revision_ | |||||||||||||||||||||||||||||||
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 | master | |
revision_ | |||||||||||||||||||||||||||||||
searchindex | |||||||||||||||||||||||||||||||
sites | |||||||||||||||||||||||||||||||
site_ | |||||||||||||||||||||||||||||||
site_ | |||||||||||||||||||||||||||||||
slots | |||||||||||||||||||||||||||||||
slot_ | |||||||||||||||||||||||||||||||
tag_ | |||||||||||||||||||||||||||||||
templatelinks | |||||||||||||||||||||||||||||||
text | |||||||||||||||||||||||||||||||
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 | master | |
trackbacks | |||||||||||||||||||||||||||||||
transcache | |||||||||||||||||||||||||||||||
updatelog | |||||||||||||||||||||||||||||||
uploadstash | |||||||||||||||||||||||||||||||
user | |||||||||||||||||||||||||||||||
user_ | |||||||||||||||||||||||||||||||
user_ | |||||||||||||||||||||||||||||||
user_ | |||||||||||||||||||||||||||||||
user_ | |||||||||||||||||||||||||||||||
user_ | |||||||||||||||||||||||||||||||
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 | master |
Database management systems[edit]
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.
If using Oracle, see maintenance/oracle/tables.sql.
See also[edit]
- Manual:Database access
- Proposed Database Schema Changes
- Database field prefixes
- w:Wikipedia:Database queries
- Developer hub
- Records of edits in the database
- A research on MediaWiki DB schema evolution
- the /diagram subpage documents the procedure to update the diagram
|