Jump to content

Manual:Content table/ki

From mediawiki.org
This page is a translated version of the page Manual:Content table and the translation is 15% complete.
Manual:Contents MediaWiki database layout content table
MediaWiki version:
1.31

The content table represents content objects. A content row represents a slot 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 the slots table.

Mûbangîre wa maûûndû,ndûkoragwo inyitîte maûndû macio (ta mandîko marîa mehau), no kûgerekanio namo tu. Its primary purpose is to provide the necessary meta-data for loading and interpreting a serialized data blob to create a content object.

Ya ingîririo thîini wa mediaWiki 1.31 îîta gîcunjî kîmwe gîa Multi-Content Revisions project; rora Multi-Content Revisions/Content Meta-Data nî ûndû wa ûhoro makîria. Hîndî ya gûthama kuma mîthemba mîkûru, meetha iûragio nî populateContentTables.php

Fields

content_id

ID of the content object

content_size

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

content_sha1

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

content_model

Reference to content_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

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

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

Schema summary

MediaWiki version:
1.31

DESCRIBE content;

+-----------------+----------------------+------+-----+---------+----------------+
| 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

MediaWiki version:
1.31

SHOW INDEX IN content;

+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| 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      |         |               |
+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+