Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:content table

From mediawiki.org
Translate this page
Languages:
Manual:Contents
MediaWiki database layout
content table
MediaWiki version:
1.31

Thecontent table representscontent objects.A content row represents aslot of a wiki page.The same content row can be reused for many revisions (e.g. when the edits only changed other slots); its association with revisions is tracked by theslots table.

The content table does not hold the actual content (such as the wikitext of a page), just a reference to it.Its primary purpose is to provide the necessary meta-data for loading and interpreting a serialized data blob to create a content object.

It was introduced in MediaWiki 1.31 as part of theMulti-Content Revisions project; seeMulti-Content Revisions/Content Meta-Data for details.During migration from older versions, the table is populated bypopulateContentTables.php (run automatically by the upgrade script).

Fields

[edit]

content_id

[edit]

ID of the content object

content_size

[edit]

Nominal size of the content object (not necessarily of the serialized blob)

content_sha1

[edit]

Nominal hash of the content object (not necessarily of the serialized blob)

content_model

[edit]

Reference tocontent_models.model_id.Note the serialization format isn't specified; it should be assumed to be in the default format for the model unless auto-detected otherwise.

content_address

[edit]

URL-like address of the content blob.Usually the structure is:tt:<id> where<id> is a number referencing thetext.old_id column.

Since MediaWiki 1.43 (T362566), when usingexternal storage, the structure ises:<URL> where<URL> is an External Storage reference, with flags added as a query string. Example:es:DB://cluster1/692465?flags=utf-8,gzip


Schema summary

[edit]
MediaWiki version:
1.31

DESCRIBEcontent;

+-----------------+----------------------+------+-----+---------+----------------+| Field           | Type                 | Null | Key | Default | Extra          |+-----------------+----------------------+------+-----+---------+----------------+| content_id      | bigint(20) unsigned  | NO   | PRI | NULL    | auto_increment || content_size    | int(10) unsigned     | NO   |     | NULL    |                || content_sha1    | varbinary(32)        | NO   |     | NULL    |                || content_model   | smallint(5) unsigned | NO   |     | NULL    |                || content_address | varbinary(255)       | NO   |     | NULL    |                |+-----------------+----------------------+------+-----+---------+----------------+

Indexes

[edit]
MediaWiki version:
1.31

SHOWINDEXINcontent;

+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| Table   | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| content |          0 | PRIMARY  |            1 | content_id  | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
Engines
Current
Former
Technical documentation
Configuration
Development
Core tables
Current
Former
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Content_table&oldid=6841569"
Category:

[8]ページ先頭

©2009-2026 Movatter.jp