Manual:comment テーブル

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Comment table and the translation is 22% complete.
Other languages:
English • ‎français • ‎中文 • ‎日本語
Manual:コンテンツ MediaWiki のデータベース レイアウト comment table


MediaWiki バージョン: 1.30

The comment table stores edits, blocks, and other actions which typically have a textual comment describing the action. They are stored in a separate table to reduce the size of the main tables, and to allow for de-duplication.

De-duplication is currently best-effort to avoid locking on inserts that would be required for strict de-duplication. There may be multiple rows with the same comment_text and comment_data.

このテーブルは Gerrit change 357892 で導入されました。

フィールド

comment_id

Unique ID to identify each comment.

comment_hash

Hash of comment_text and comment_data, for de-duplication.

comment_text

Text comment summarizing the change, e.g. an editor's edit summary. This text is shown in the history and contributions . It is also used for recent changes , related changes , watchlists , and, in the case of page creation, for the list of new pages . It is rendered in a sanitized subset of wiki markup by Linker::formatComment(). Size limits are enforced at the application level, and should take care to crop UTF-8 strings appropriately.

comment_data

JSON data, intended for localizing auto-generated comments. This holds structured data that is intended to be used to provide localized versions of automatically-generated comments. When not empty, comment_text should be the generated comment localized using the wiki's content language.

スキーマ

MediaWiki バージョン: 1.30

describe comment;

+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| comment_id   | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| comment_hash | int(11)             | NO   | MUL | NULL    |                |
| comment_text | blob                | NO   |     | NULL    |                |
| comment_data | blob                | YES  |     | NULL    |                |
+--------------+---------------------+------+-----+---------+----------------+