Manual:Sites table/es

La tabla de sitios, introducida en en mayo de 2013, contiene todos los sitios que conoce el wiki.

site_id
Numeric id of the site. This is an auto-incrementing primary key.

site_global_key
Identificador global del sitio. Por ejemplo: 'enwiktionary'

site_type
Tipo del sitio. Por ejemplo: 'mediawiki'

site_group
Grupo del sitio. Por ejemplo: 'wikipedia'

site_source
Fuente de datos del sitio. Por ejemplo: 'local', 'wikidata', 'mi-repositorio'

site_language
Código del idioma principal de los sitios.

site_protocol
Protocolo del sitio. Por ejemplo: 'http://', 'irc://', '//'.

This field is an index for lookups and is built from type specific data in site_data.

site_domain
Domain of the site in reverse order, ie 'gro.ikiwaidem.www.'.

This field is an index for lookups and is built from type specific data in site_data.

site_data
Type dependent site data.

site_forward
If site.tld/path/key:pageTitle should forward users to the page on the actual site, where "key" is the local identifier.

site_config
Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.

Managing the sites table
The sites table is shipped without data for a new MediaWiki installation.

Importing sites table from another wiki
There're two ways of populating the sites table using another wiki as a source. If you have access to the other wiki's server, you can run the  maintenance script and import the data using the   maintenance script of your MediaWiki installation.

If you don't have access to the other wiki's server but the other MediaWiki installation has the SiteMatrix extension installed, you can use a maintenance script from the Wikibase extension to import all sites from the other wiki.

Adding a new site
If you want to add a new site into your MediaWiki's site table, you can use the maintenance script.

Additionally, the above mentioned  maintenance script can be used to add an arbitrary group of wikis from custom made XML file in the following format:

Each element representing a site.

and  can be inferred from   page of the intended wiki.

Insert wiki family (using Script)
A veces debes añadir tus wikis en esta tabla. Puedes usar este código:

Reloading the cached sites table
MediaWiki caches the sites table in the local-server cache if it is available (ACPu or WinCache installed). After making changes to the sites table using any of the above methods, you should reload or restart any long-running MediaWiki PHP processes: your web server, continuous (if any), etc. Otherwise, changes to the sites table will only become effective after the cache expires.

Schema summary
+-+--+--+-+-++ +-+--+--+-+-++ +-+--+--+-+-++
 * Field          | Type             | Null | Key | Default | Extra          |
 * site_id        | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
 * site_global_key | varbinary(64)   | NO   | UNI | NULL    |                |
 * site_type      | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_group     | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_source    | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_language  | varbinary(35)    | NO   | MUL | NULL    |                |
 * site_protocol  | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_domain    | varbinary(255)   | NO   | MUL | NULL    |                |
 * site_data      | blob             | NO   |     | NULL    |                |
 * site_forward   | tinyint(1)       | NO   | MUL | NULL    |                |
 * site_config    | blob             | NO   |     | NULL    |                |

+-+--+--+-+-++ +-+--+--+-+-++ +-+--+--+-+-++
 * Field          | Type             | Null | Key | Default | Extra          |
 * site_id        | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
 * site_global_key | varbinary(32)   | NO   | UNI | NULL    |                |
 * site_type      | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_group     | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_source    | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_language  | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_protocol  | varbinary(32)    | NO   | MUL | NULL    |                |
 * site_domain    | varbinary(255)   | NO   | MUL | NULL    |                |
 * site_data      | blob             | NO   |     | NULL    |                |
 * site_forward   | tinyint(1)       | NO   | MUL | NULL    |                |
 * site_config    | blob             | NO   |     | NULL    |                |

Indexes
 +---++-+--+-+---+-+--++--++-+---+ +---++-+--+-+---+-+--++--++-+---+ +---++-+--+-+---+-+--++--++-+---+
 * Table | Non_unique | Key_name       | Seq_in_index | Column_name     | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
 * sites |         0 | PRIMARY         |            1 | site_id         | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         0 | site_global_key |            1 | site_global_key | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_type       |            1 | site_type       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_group      |            1 | site_group      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_source     |            1 | site_source     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_language   |            1 | site_language   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_protocol   |            1 | site_protocol   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_domain     |            1 | site_domain     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * sites |         1 | site_forward    |            1 | site_forward    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |