手册:links表

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Links table and the translation is 38% complete.

Other languages:
English • ‎español • ‎polski • ‎中文 • ‎日本語
手册:目录 MediaWiki数据库布局 links table/zh


MediaWiki版本: 1.1 – 1.3
links和brokenlinks表已合并为pagelinks 表,它记录目标链接的名字空间+标题密钥对,而不是页面ID或带前缀的标题。 参见[1]

The links table stored all the links to existing articles. This was good for a variety of functions, from link caching in the output functions to the "what links here" page. It was the "good twin" of the brokenlinks table.

从MediaWiki 1.5版本开始,该表不再使用,并可以安全删除。 内容已在更新期间合并至pagelinks 表。 Regenerating the pagelinks table always is possible using the rebuildall maintenance script.

l_from is the cur_id of the article that contains the link. (This is a change from 1.2, wherein the title of the article was stored. This was not very wise, and has now been fixed.)

l_to is the cur_id of the "target" article.

Schema summary

MediaWiki版本: 1.3
+--------+-----------------+------+-----+---------+-------+
| Field  | Type            | Null | Key | Default | Extra |
+--------+-----------------+------+-----+---------+-------+
| l_from | int(8) unsigned | NO   | PRI | 0       |       |
| l_to   | int(8) unsigned | NO   | PRI | 0       |       |
+--------+-----------------+------+-----+---------+-------+
MediaWiki版本: 1.2
+--------+-----------------+------+-----+---------+-------+
| Field  | Type            | Null | Key | Default | Extra |
+--------+-----------------+------+-----+---------+-------+
| l_from | varchar(255)    | NO   | PRI |         |       |
| l_to   | int(8) unsigned | NO   | PRI | 0       |       |
+--------+-----------------+------+-----+---------+-------+
MediaWiki版本: 1.1
+--------+-----------------+------+-----+---------+-------+
| Field  | Type            | Null | Key | Default | Extra |
+--------+-----------------+------+-----+---------+-------+
| l_from | varchar(255)    | NO   |     |         |       |
| l_to   | int(8) unsigned | NO   |     | 0       |       |
+--------+-----------------+------+-----+---------+-------+