Manual:Templatelinks-tabell
â Manual:InnehĂ„ll | MediaWiki database layout | templatelinks table |
MediaWiki-version: | ≥ 1.6 |
Tabellen templatelinks innehÄller vÀrdsidans ID, namnrymdsnumret för den inkluderade sidan och dess titel utan namnrymd, för varje nuvarande infogning.
MÄlsidan kan finnas eller inte, och pÄ grund av namnbyten och raderingar kan den hÀnvisa till olika sidoregister allt eftersom tiden gÄr.
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.
(E.g. Scribunto 's {{#invoke:...}}
and TemplateStyles 's <templatestyles src="..." />
both record the target page in the templatelinks table.)
FĂ€lt
tl_from
Nyckeln till $id pÄ sidan som innehÄller lÀnken.
tl_namespace
MediaWiki-versioner: | 1.6 – 1.38 |
Nyckeln till $ns pÄ mÄlsidan. AnvÀnds tillsammans med $titel.
tl_title
MediaWiki-versioner: | 1.6 – 1.38 |
Nyckeln till $titel pÄ mÄlsidan. AnvÀnds tillsammans med $ns.
tl_from_namespace
MediaWiki-version: | ≥ 1.24 |
page_namespace pÄ sidan som innehÄller lÀnken.
tl_target_id
MediaWiki-version: | ≥ 1.38 |
Foreign key to linktarget.lt_id
Sammanfattningar av schemat
MediaWiki-version: | ≥ 1.39 |
DESCRIBE templatelinks;
+-------------------+---------------------+------+-----+---------+-------+ | 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 | | +-------------------+---------------------+------+-----+---------+-------+
MediaWiki-version: | 1.38 |
DESCRIBE templatelinks;
+-------------------+---------------------+------+-----+---------+-------+ | 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 | | +-------------------+---------------------+------+-----+---------+-------+
MediaWiki-versioner: | 1.36 – 1.37 |
DESCRIBE templatelinks;
+-------------------+------------------+------+-----+---------+-------+ | 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 | | +-------------------+------------------+------+-----+---------+-------+
MediaWiki-versioner: | 1.26 – 1.35 |
DESCRIBE templatelinks;
+-------------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------------+------------------+------+-----+---------+-------+ | tl_from | int(10) unsigned | NO | PRI | 0 | | | tl_from_namespace | int(11) | NO | MUL | 0 | | | tl_namespace | int(11) | NO | PRI | 0 | | | tl_title | varbinary(255) | NO | PRI | | | +-------------------+------------------+------+-----+---------+-------+
MediaWiki-versioner: | 1.24 – 1.25 |
DESCRIBE templatelinks;
+-------------------+---------------------+------+-----+-----------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------------+---------------------+------+-----+-----------+-------+ | tl_from | int(10) unsigned | NO | PRI | 0 | | | tl_from_namespace | int(11) | NO | | 0 | | | tl_namespace | int(11) | NO | PRI | 0 | | | tl_title | varchar(255) binary | NO | PRI | 0 | | +-------------------+---------------------+------+-----+-----------+-------+
MediaWiki-versioner: | 1.10 – 1.23 |
DESCRIBE templatelinks;
+---------------+---------------------+------+-----+-----------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+---------------------+------+-----+-----------+-------+ | tl_from | int(10) unsigned | NO | PRI | 0 | | | tl_namespace | int(11) | NO | PRI | 0 | | | tl_title | varchar(255) binary | NO | PRI | 0 | | +---------------+---------------------+------+-----+-----------+-------+
MediaWiki-versioner: | 1.6 – 1.9 |
DESCRIBE templatelinks;
+---------------+---------------------+------+-----+-----------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+---------------------+------+-----+-----------+-------+ | tl_from | int(8) unsigned | NO | PRI | 0 | | | tl_namespace | int(8) | NO | PRI | 0 | | | tl_title | varchar(255) binary | NO | PRI | 0 | | +---------------+---------------------+------+-----+-----------+-------+
Indexes
MediaWiki-version: | ≥ 1.39 |
SHOW INDEX IN templatelinks;
+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | 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 | | | +---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+