Manual:externallinks table

From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português
Manual:ContentsManual:Contents MediaWiki database layoutManual:Database layout externallinks table


The externallinks table is where MediaWiki stores and tracks external links.

Note: protocol-relative links are stored twice in this table as per https://phabricator.wikimedia.org/rSVN102951.

This table was introduced after 1.5.

Fields[edit]

el_id[edit]

MediaWiki version: 1.22

The primary key. Presently not used for anything, but will help with online schema changes.

el_from[edit]

The page identifier of the referring wiki page.

el_to[edit]

The actual URL itself. It is passed to the browser.

el_index[edit]

This is the same URL as el_to search-optimized: username and password information is stripped, and the other components are reversed for faster searching, so http://user:password@sub.example.com/page.html becomes http://com.example.sub./page.html, which allows searches of the form 'Show all links pointing to *.example.com'.

el_index_60[edit]

MediaWiki version: 1.29

This is el_index truncated to 60 bytes to allow for sortable queries that aren't supported by a partial index.

@todo Drop the default once this is deployed everywhere and code is populating it.

Schema summary[edit]

MediaWiki version: 1.29

DESCRIBE externallinks;

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| el_id       | int(10) unsigned | NO   | PRI | NULL    | AUTO_INCREMENT |
| el_from     | int(10) unsigned | NO   | MUL | 0       |                |
| el_to       | blob             | NO   | MUL | NULL    |                |
| el_index    | blob             | NO   | MUL | NULL    |                |
| el_index_60 | varbinary(60)    | NO   |     | ''      |                |
+-------------+------------------+------+-----+---------+----------------+


MediaWiki versions: 1.10 – 1.21

DESCRIBE externallinks;

+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| el_from  | int(10) unsigned | NO   | MUL | 0       |       |
| el_to    | blob             | NO   | MUL | NULL    |       |
| el_index | blob             | NO   | MUL | NULL    |       |
+----------+------------------+------+-----+---------+-------+


MediaWiki versions: 1.6 – 1.9

DESCRIBE externallinks;

+----------+-----------------+------+-----+---------+-------+
| Field    | Type            | Null | Key | Default | Extra |
+----------+-----------------+------+-----+---------+-------+
| el_from  | int(8) unsigned | NO   | MUL | 0       |       |
| el_to    | blob            | NO   | MUL | NULL    |       |
| el_index | blob            | NO   | MUL | NULL    |       |
+----------+-----------------+------+-----+---------+-------+
DatabasesManual:Database layout Engines: MySQL/MariaDBManual:MySQLOracleManual:OraclePostgreSQLManual:PostgreSQLSQLiteManual:SQLiteSQL ServerManual:Microsoft SQL Server

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: archivebot_passwordscategorycategorylinkschange_tagcommentconfigexternallinksfilearchivehitcounterimageimagelinksimage_comment_tempinterwikiiwlinksipblocksip_changesjobl10n_cachelanglinkslogginglog_searchmsg_resourcemsg_resource_linksmodule_depsobjectcacheoldimagepagepagelinkspage_propspage_restrictionsprotected_titlesquerycachequerycachetwoquerycache_inforecentchangesredirectrevisionrevision_comment_tempsearchindexsitessite_identifiers - site_statstag_summarytemplatelinkstexttranscacheupdateloguploadstashuseruser_former_groupsuser_groupsuser_newtalkuser_propertiestag_summaryvalid_tagwatchlist