Manual:Sites table/ja

sites テーブルは、2013年5月に で導入されたものであり、ウィキが知っているすべてのサイトを保持します.

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

site_global_key
サイトのグローバル識別子. 'enwiktionary'

site_type
サイトの種類. 'mediawiki'

site_group
サイトのグループ. 'wikipedia'

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

site_language
サイトの主言語の言語コード.

site_protocol
サイトのプロトコル. '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.

スキーマの概要
+-+--+--+-+-++ +-+--+--+-+-++ +-+--+--+-+-++
 * 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    | varchar(255)     | NO   | MUL | NULL    |                |
 * site_data      | blob             | NO   |     | NULL    |                |
 * site_forward   | bool             | NO   | MUL | NULL    |                |
 * site_config    | blob             | NO   |     | NULL    |                |

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've access to the other wikis 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 wikis 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.

Insert wiki family (using Script)
Sometimes, you have to add your wikis in this table. 以下のコードを使用できます: