Manual:Templatelinks table

From MediaWiki.org
Jump to: navigation, search
Language: English  • 日本語 • polski
Manual:ContentsManual:Contents MediaWiki database layoutManual:Database layout templatelinks table


MediaWiki version: 1.6


Contains for each current page inclusion the id of the host page, the namespace number of the included page, and its title without namespace.

The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.[1]

Fields[edit | edit source]

tl_from[edit | edit source]

Key to the page_id of the page containing the link.

tl_from_namespace[edit | edit source]

MediaWiki version: 1.24

page_namespace of the page containing the link.

tl_namespace[edit | edit source]

Key to page_namespace of the target page. Used in conjunction with tl_title.

tl_title[edit | edit source]

Key to page_title of the target page. Used in conjunction with tl_namespace.

Schema summary[edit | edit source]

MediaWiki version: 1.16

DESCRIBE templatelinks; on MediaWiki 1.16 gives the following:

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


MediaWiki version: 1.9

DESCRIBE templatelinks; on MediaWiki 1.9 gives the following:

+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| tl_from      | int(8) unsigned | NO   | PRI | 0       |       |
| tl_namespace | int(11)         | NO   | PRI | 0       |       |
| tl_title     | varchar(255)    | NO   | PRI | NULL    |       |
+--------------+-----------------+------+-----+---------+-------+


MediaWiki version: 1.8

DESCRIBE templatelinks; on MediaWiki 1.8 gives the following:

+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| tl_from      | int(8) unsigned | NO   | PRI | 0       |       |
| tl_namespace | int(11)         | NO   | PRI | 0       |       |
| tl_title     | varchar(255)    | NO   | PRI | NULL    |       |
+--------------+-----------------+------+-----+---------+-------+


MediaWiki version: 1.6

This table is new in version 1.6.

DESCRIBE templatelinks; on MediaWiki 1.6 gives the following:

+---------------+---------------------+------+-----+-----------+-------+
| Field         | Type                | Null | Key | Default   | Extra |
+---------------+---------------------+------+-----+-----------+-------+
| tl_from       | int(8)              | NO   | PRI | 0         |       |
| tl_namespace  | tinyint(2) unsigned | NO   | PRI |           |       |
| tl_title      | varchar(255)        | NO   | PRI | 0         |       |
+---------------+---------------------+------+-----+-----------+-------+
DatabasesManual:Database layout Engines: MySQLManual:MySQLOracleManual:OraclePostgreSQLManual:PostgreSQLSQLiteManual:SQLite
Technical documentation: SchemaManual:Database layout (tablesCategory:MediaWiki database tables) – API property associationsAPI:Database field and API property associationsField prefixesDatabase field prefixesPrimary key storage in other fieldsManual:Primary key storage in other fieldsWikimedia extension tablesCategory:Wikimedia extension database tables
Configuration: SettingsManual:Configuration_settings#Database_settingsSharingManual:Shared database
Development: AccessManual:Database accessOptimizationDatabase optimizationPolicyDevelopment policy#Database_patchesUpdaterManual:DatabaseUpdater.phpExtension schema updatesManual:Hooks/LoadExtensionSchemaUpdatesPatch fileManual:SQL patch file
Core tables: archivecategorycategorylinkschange_tagconfigexternallinksfilearchivehitcounterimageimagelinksinterwikiiwlinksipblocksjobl10n_cachelanglinkslogginglog_searchmsg_resourcemsg_resource_linksmodule_depsobjectcacheoldimagepagepagelinkspage_propspage_restrictionsprotected_titlesquerycachequerycachetwoquerycache_inforecentchangesredirectrevisionsearchindexsitessite_statstag_summarytemplatelinkstexttranscacheupdateloguploadstashuseruser_former_groupsuser_groupsuser_newtalkuser_propertiesvalid_tagwatchlist