Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:text table

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

Thetext table holds the wikitext of individual page revisions.If using Postgres or Oracle, this table is namedpagecontent.Extensions may also store data here.

Field names are a holdover from theold revisions table in MediaWiki 1.4 and earlier.

If you updated your wiki from MediaWiki 1.4 or older to a newer version, and if you have then run update.php at least once, you will still have old columns in thetext table, whose contents have been migrated to thepage table and therevision table (content is copied, not cut).These columns in thetext table will not be used anymore.All fields in thetext tableexceptold_id,old_text andold_flags are not needed anymore andcan be safely deleted.

Text content can be compressed orstored externally, and thus difficult to get from this table.ThefetchText.php maintenance script can be used to retrieve the text of a givenold_id.

Extensions can add other custom flags.

This table can also hold metadata of files if the metadata is too big to store inimg_metadata,oi_metadata orfa_metadata.

Fields

[edit]

old_id

[edit]

Unique integer used to identify each text.It's referenced by thecontent.content_address incontent table.BeforeMulti-Content Revisions implementation,revision.rev_text_id inrevision table andar_text_id inarchive table were keys to this column.

Alsoimg_metadata,oi_metadata orfa_metadata can refer to this column when being used to store file metadata.

old_text

[edit]

The wikitext of the page, or a pointer toexternal storage of the form ofDB://cluster/id.

old_flags

[edit]

Comma-separated list of flags.Contains the following possible values:

gzipText is compressed with PHP'sgzdeflate() function.
If the$wgCompressRevisions option is on, new rows (=current revisions) will be gzipped transparently at save time. Previous revisions can also be compressed by using the scriptcompressOld.php
utf-8Text was stored as UTF-8.
If the$wgLegacyEncoding option is on, rowswithout this flag will be converted to UTF-8 transparently at load time.
objectText field contained a serialized PHP object.
The object either contains multiple versions compressed together to achieve a better compression ratio, or it refers to another row where the text can be found.
externalText was stored in anexternal location specified by old_text.
Any additional flags apply to the data stored at that URL, not the URL itself. The 'object' flag isnot set for URLs of the form 'DB://cluster/id/itemid', because the external storage system itself decompresses these. See also$wgDefaultExternalStore.

textvector

[edit]
Only used byPostgreSQL

Used instead of thesearchindex table by PostgreSQL to facilitate fulltext search.

Schema summary

[edit]
MediaWiki version:
1.10

DESCRIBEtext;

+-----------+------------------+------+-----+---------+----------------+| Field     | Type             | Null | Key | Default | Extra          |+-----------+------------------+------+-----+---------+----------------+| old_id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment || old_text  | mediumblob       | NO   |     | NULL    |                || old_flags | tinyblob         | NO   |     | NULL    |                |+-----------+------------------+------+-----+---------+----------------+
MediaWiki versions:
1.5 – 1.9

DESCRIBEtext;

+-----------+-----------------+------+-----+---------+----------------+| Field     | Type            | Null | Key | Default | Extra          |+-----------+-----------------+------+-----+---------+----------------+| old_id    | int(8) unsigned | NO   | PRI | NULL    | AUTO_INCREMENT || old_text  | mediumblob      | NO   |     | NULL    |                || old_flags | tinyblob        | NO   |     | NULL    |                |+-----------+-----------------+------+-----+---------+----------------+

Indexes

[edit]
MediaWiki version:
1.5

SHOWINDEXINtext;

+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| text  |          0 | PRIMARY  |            1 | old_id      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

See also

[edit]
Engines
Current
Former
Technical documentation
Configuration
Development
Core tables
Current
Former
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Text_table&oldid=7721535"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp