Manual:Text table/zh

text表存放每个页面版本的维基文本. 如果使用了Postgres或Oracle，这个表被命名为pagecontent. 扩展也可以在此存储数据.

Field names are a holdover from the 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 the text table, whose contents have been migrated to the ' table and the ' table (content is copied, not cut). text表中的这些列不会再被使用. 所有在text表中除了 old_id, old_text 和 old_flags以外的字段都不再需要因此可以安全删除.

文本内容可以压缩或在外部存储，因此难以从这个表中得到. 维护脚本可以用来获取指定 的文本.

架构摘要
+---+--+--+-+-++ +---+--+--+-+-++ +---+--+--+-+-++
 * 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    |                |

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

old_id
标识每段文本的唯一整数. 在表中由引用. Before Multi-Content Revisions implementation, in  table and  in  table were keys to this column.

old_text
The wikitext of the page, or a pointer to external storage of the form of.

old_flags
逗号分隔的标志列表. 包括如下可能的值：


 * {|class="wikitable"


 * | 文本已通过PHP的 函数压缩.
 * | 文本以UTF-8存储.
 * | Text field contained a serialized PHP object.
 * | Text was stored in an external location specified by old_text.
 * }
 * | Text field contained a serialized PHP object.
 * | Text was stored in an external location specified by old_text.
 * }
 * | Text was stored in an external location specified by old_text.
 * }
 * | Text was stored in an external location specified by old_text.
 * }

扩展也可以添加其它自定义标志.