Manual:Templatelinks table: Difference between revisions
Content deleted Content added
update |
Pppery (alt) (talk | contribs) m →top: clean up links to Meta, replaced: m:Special:MyLanguage/Help: → Special:MyLanguage/Help: |
||
(25 intermediate revisions by 9 users not shown) | |||
Line 5:
<translate>
<!--T:1-->
The <tvar
<!--T:2-->
The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.
</translate>▼
<translate><!--T:13--> Despite the name, transclusions are not limited to templates, nor to the MediaWiki parser's transclusion mechanism; various extensions use this table to mark that they have incorporated content from another page.</translate>
<translate><!--T:14--> (E.g. <tvar name=1>{{ll|Extension:Scribunto|Scribunto}}</tvar>'s <tvar name=2><code><nowiki>{{#invoke:...}}</nowiki></code></tvar> and <tvar name=3>{{ll|Extension:TemplateStyles|TemplateStyles}}</tvar>'s <tvar name=4><code><nowiki><templatestyles src="..." /></nowiki></code></tvar> both record the target page in the <tvar name=5><code>templatelinks</code></tvar> table.)</translate>
<translate>▼
==Fields== <!--T:3-->
</translate>
===tl_from===
<translate><!--T:4--> Key to the <tvar
▲<translate>
===tl_namespace===
▲Key to the <tvar|id>{{ll|Manual:Page table#page_id|page_id}}</> of the page containing the link.
{{MW version|version=1.6|version2=1.38}}
▲</translate>
<translate><!--T:6--> Key to <tvar
<translate><!--T:7--> Used in conjunction with <tvar
===tl_title===▼
{{MW version|version=1.6|version2=1.38}}
<translate><!--T:8--> Key to <tvar
<translate><!--T:10--> Used in conjunction with <tvar
===tl_from_namespace===
{{MW 1.24|and after}}
<translate><!--T:5--> <tvar name=ns>{{ll|Manual:Page table#page_namespace|page_namespace}}</tvar> of the page doing the transclusion.</translate>
<translate>▼
▲<tvar|ns>{{ll|Manual:Page table#page_namespace|page_namespace}}</> of the page containing the link.
</translate>▼
===
{{MW 1.38|+}}
<translate>
<!--T:
▲Used in conjunction with <tvar|title>tl_title</>.
▲===tl_title===
▲Key to <tvar|title>{{ll|Manual:Page table#page_title|page_title}}</> of the target page.</translate>
▲Used in conjunction with <tvar|ns>tl_namespace</>.
==Schema summary== <!--T:9-->
</translate>
{{MW 1.
{{describe table}}
<pre>
+-------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+-------+
| tl_from | int(10) unsigned | NO | PRI | 0 | |
| tl_target_id | bigint(20) unsigned | NO | PRI | NULL | |
| tl_from_namespace | int(11) | NO | MUL | 0 | |
+-------------------+---------------------+------+-----+---------+-------+
</pre>
{{MW version|version=1.38}}
{{describe table}}
<pre>
+-------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+-------+
| tl_from | int(10) unsigned | NO | PRI | 0 | |
| tl_namespace | int(11) | NO | PRI | 0 | |
| tl_title | varbinary(255) | NO | PRI | | |
| tl_from_namespace | int(11) | NO | MUL | 0 | |
| tl_target_id | bigint(20) unsigned | YES | MUL | NULL | |
+-------------------+---------------------+------+-----+---------+-------+
</pre>
{{MW version|version=1.36|version2=1.37}}
{{describe table}}
<pre>
+-------------------+------------------+------+-----+---------+-------+
Line 59 ⟶ 83:
{{MW version|version=1.26|version2=1.35}}
{{describe table}}
<pre>
+-------------------+------------------+------+-----+---------+-------+
Line 72 ⟶ 96:
{{MW version|version=1.24|version2=1.25}}
{{describe table}}
<pre>
+-------------------+---------------------+------+-----+-----------+-------+
Line 85 ⟶ 109:
{{MW version|version=1.10|version2=1.23}}
{{describe table}}
<pre>
+---------------+---------------------+------+-----+-----------+-------+
Line 97 ⟶ 121:
{{MW version|version=1.6|version2=1.9}}
{{describe table}}
<pre>
+---------------+---------------------+------+-----+-----------+-------+
Line 106 ⟶ 130:
| tl_title | varchar(255) binary | NO | PRI | 0 | |
+---------------+---------------------+------+-----+-----------+-------+
</pre>
▲<translate>
==Indexes== <!--T:12-->
▲</translate>
{{MW 1.39|and after}}
{{show index in table}}
<pre style="overflow-x: scroll; white-space: pre;">
+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| templatelinks | 0 | PRIMARY | 1 | tl_from | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 0 | PRIMARY | 2 | tl_target_id | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 1 | tl_target_id | 1 | tl_target_id | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 1 | tl_target_id | 2 | tl_from | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 1 | tl_backlinks_namespace_target_id | 1 | tl_from_namespace | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 1 | tl_backlinks_namespace_target_id | 2 | tl_target_id | A | 0 | NULL | NULL | | BTREE | | |
| templatelinks | 1 | tl_backlinks_namespace_target_id | 3 | tl_from | A | 0 | NULL | NULL | | BTREE | | |
+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
</pre>
|