Manual:Sites table/ru

sites table, введена в в мае 2013, содержит все сайты, известные в вики.

site_id
Цифровой идентификатор сайта. Это первичный автоинкрементный ключ.

site_global_key
Глобальный идентификатор для сайта, например 'enwiktionary'

site_type
Тип сайта, например 'mediawiki'

site_group
Group of the site, ie 'wikipedia'

site_source
Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'

site_language
Language code of the sites primary language.

site_protocol
Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.

site_domain
Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build 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.

Schema summary
DESCRIBE sites; in MediaWiki 1.22alpha (2a2e9e6) results in: +-+--+--+-+-++ +-+--+--+-+-++ +-+--+--+-+-++
 * 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    |                |

Insert wiki family
Sometimes, you have to add your wikis in this table. You can use this code: