|
|
本館粉絲專頁 |
|
|
使用者:Minwei/維基筆記/Schema轉換/Unalterable Tables:修訂版本之間的差異
台灣棒球維基館
< 使用者:Minwei | 維基筆記 | Schema轉換
| (由2名用戶作出的2個中途修訂版本未被顯示) | |||
| 第1行: | 第1行: | ||
| + | = Categorylinks table = | ||
| + | <div class="minwei" style="float:right; border: 1px solid blue; padding: 5px 2px 5px 2px; background-color: #FFFFCC; width:210px" >MediaWiki version: 1.9 and after</div>屬性有小變動。 | ||
| + | <pre>mysql> describe mw_categorylinks; | ||
| + | |||
| + | +--------------+-----------------+------+-----+-------------------+-------+ | ||
| + | | Field | Type | Null | Key | Default | Extra | | ||
| + | +--------------+-----------------+------+-----+-------------------+-------+ | ||
| + | | cl_from | int(8) unsigned | NO | PRI | 0 | | | ||
| + | | cl_to | varchar(255) | NO | PRI | NULL | | | ||
| + | | cl_sortkey | varchar(86) | NO | | NULL | | | ||
| + | | cl_timestamp | timestamp | YES | | CURRENT_TIMESTAMP | | | ||
| + | +--------------+-----------------+------+-----+-------------------+-------+ | ||
| + | 4 rows in set (0.02 sec)</pre> | ||
| + | |||
= Hitcounter table = | = Hitcounter table = | ||
<div class="minwei" style="float:right; border: 1px solid blue; padding: 5px 2px 5px 2px; background-color: #FFFFCC; width:230px" >MediaWiki version: 1.3 and after</div> | <div class="minwei" style="float:right; border: 1px solid blue; padding: 5px 2px 5px 2px; background-color: #FFFFCC; width:230px" >MediaWiki version: 1.3 and after</div> | ||
| 第4行: | 第18行: | ||
mysql> describe mw_hitcounter; | mysql> describe mw_hitcounter; | ||
+-------+------------------+------+-----+---------+-------+ | +-------+------------------+------+-----+---------+-------+ | ||
| − | | Field | Type | + | | Field | Type | Null | Key | Default | Extra | |
+-------+------------------+------+-----+---------+-------+ | +-------+------------------+------+-----+---------+-------+ | ||
| − | | hc_id | int(10) unsigned | NO | + | | hc_id | int(10) unsigned | NO | | NULL | | |
+-------+------------------+------+-----+---------+-------+ | +-------+------------------+------+-----+---------+-------+ | ||
1 row in set (0.00 sec) | 1 row in set (0.00 sec) | ||
| 第14行: | 第28行: | ||
<pre> | <pre> | ||
+---------+-----------------+------+-----+---------+-------+ | +---------+-----------------+------+-----+---------+-------+ | ||
| − | | Field | + | | Field | Type | Null | Key | Default | Extra | |
+---------+-----------------+------+-----+---------+-------+ | +---------+-----------------+------+-----+---------+-------+ | ||
| − | | il_from | int(8) unsigned | NO | PRI | 0 | + | | il_from | int(8) unsigned | NO | PRI | 0 | | |
| − | | il_to | varchar(255) | + | | il_to | varchar(255) | NO | PRI | NULL | | |
+---------+-----------------+------+-----+---------+-------+ | +---------+-----------------+------+-----+---------+-------+ | ||
</pre> | </pre> | ||
= Math table = | = Math table = | ||
| + | <pre> | ||
mysql> describe mw_math; | mysql> describe mw_math; | ||
+----------------------------+-------------+------+-----+---------+-------+ | +----------------------------+-------------+------+-----+---------+-------+ | ||
| − | | Field | + | | Field | Type | Null | Key | Default | Extra | |
+----------------------------+-------------+------+-----+---------+-------+ | +----------------------------+-------------+------+-----+---------+-------+ | ||
| − | | math_inputhash | + | | math_inputhash | varchar(16) | NO | PRI | NULL | | |
| − | | math_outputhash | + | | math_outputhash | varchar(16) | NO | | NULL | | |
| − | | math_html_conservativeness | tinyint(1) | + | | math_html_conservativeness | tinyint(1) | NO | | NULL | | |
| − | | math_html | + | | math_html | text | YES | | NULL | | |
| − | | math_mathml | + | | math_mathml | text | YES | | NULL | | |
+----------------------------+-------------+------+-----+---------+-------+ | +----------------------------+-------------+------+-----+---------+-------+ | ||
5 rows in set (0.00 sec) | 5 rows in set (0.00 sec) | ||
| + | </pre> | ||
| + | |||
| + | = User groups table = | ||
| + | The '''user groups table''' maps the users in a particular MediaWiki installation to their corresponding [[http://www.mediawiki.org/wiki/Help:User_rights user rights]]. Each group can be assigned a mixture of permissions through [[Manual:LocalSettings.php|LocalSettings.php]] or via extensions; all users of a particular group have those permissions granted to them as a result of their membership in the group. As the table is separate from the [[user table]], this allows for the creation of a shared user database with permissions that vary from wiki to wiki within a wiki farm. This table was introduced on [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?revision=5648&view=markup r5648], in MediaWiki 1.5.<div class="minwei" style="float:right; border: 1px solid blue; padding: 5px 2px 5px 2px; background-color: #FFFFCC; width:130px" >MediaWiki version: 1.5</div> | ||
| + | 在nadp裡面,被分割成「<b>user_rights</b>」資料表。 | ||
| + | <pre> | ||
| + | +----------+-----------------+------+-----+---------+-------+ | ||
| + | | Field | Type | Null | Key | Default | Extra | | ||
| + | +----------+-----------------+------+-----+---------+-------+ | ||
| + | | ug_user | int(5) unsigned | NO | PRI | 0 | | | ||
| + | | ug_group | char(16) | NO | PRI | NULL | | | ||
| + | +----------+-----------------+------+-----+---------+-------+ | ||
| + | </pre> | ||
| + | In a default mediaWiki installation, ug_group can be one of the following : | ||
| + | <pre> | ||
| + | query : SELECT DISTINCT ug_group FROM user_groups; | ||
| + | +------------+ | ||
| + | | ug_group | | ||
| + | +------------+ | ||
| + | | bot | | ||
| + | | bureaucrat | | ||
| + | | checkuser | | ||
| + | | developer | | ||
| + | | steward | | ||
| + | | sysop | | ||
| + | +------------+ | ||
| + | </pre> | ||
| + | |||
| + | = User newtalk table = | ||
| + | <pre> | ||
| + | mysql> describe mw_user_newtalk; | ||
| + | +---------+-------------+------+-----+---------+-------+ | ||
| + | | Field | Type | Null | Key | Default | Extra | | ||
| + | +---------+-------------+------+-----+---------+-------+ | ||
| + | | user_id | int(5) | NO | MUL | 0 | | | ||
| + | | user_ip | varchar(40) | NO | MUL | NULL | | | ||
| + | +---------+-------------+------+-----+---------+-------+ | ||
| + | 2 rows in set (0.03 sec) | ||
| + | </pre> | ||
| + | |||
| + | = Validate table = | ||
| + | It is was, and still is used as part of Extension:Review, however, no core software needs it. | ||
2007年11月30日 (五) 21:02的最新修訂版本
目次 |
[編輯] Categorylinks table
MediaWiki version: 1.9 and after
屬性有小變動。
mysql> describe mw_categorylinks; +--------------+-----------------+------+-----+-------------------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------+------+-----+-------------------+-------+ | cl_from | int(8) unsigned | NO | PRI | 0 | | | cl_to | varchar(255) | NO | PRI | NULL | | | cl_sortkey | varchar(86) | NO | | NULL | | | cl_timestamp | timestamp | YES | | CURRENT_TIMESTAMP | | +--------------+-----------------+------+-----+-------------------+-------+ 4 rows in set (0.02 sec)
[編輯] Hitcounter table
MediaWiki version: 1.3 and after
mysql> describe mw_hitcounter; +-------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+------------------+------+-----+---------+-------+ | hc_id | int(10) unsigned | NO | | NULL | | +-------+------------------+------+-----+---------+-------+ 1 row in set (0.00 sec)
[編輯] Imagelinks table
MediaWiki version: 1.3 and after
+---------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-----------------+------+-----+---------+-------+ | il_from | int(8) unsigned | NO | PRI | 0 | | | il_to | varchar(255) | NO | PRI | NULL | | +---------+-----------------+------+-----+---------+-------+
[編輯] Math table
mysql> describe mw_math; +----------------------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------------------+-------------+------+-----+---------+-------+ | math_inputhash | varchar(16) | NO | PRI | NULL | | | math_outputhash | varchar(16) | NO | | NULL | | | math_html_conservativeness | tinyint(1) | NO | | NULL | | | math_html | text | YES | | NULL | | | math_mathml | text | YES | | NULL | | +----------------------------+-------------+------+-----+---------+-------+ 5 rows in set (0.00 sec)
[編輯] User groups table
The user groups table maps the users in a particular MediaWiki installation to their corresponding [user rights]. Each group can be assigned a mixture of permissions through LocalSettings.php or via extensions; all users of a particular group have those permissions granted to them as a result of their membership in the group. As the table is separate from the user table, this allows for the creation of a shared user database with permissions that vary from wiki to wiki within a wiki farm. This table was introduced on r5648, in MediaWiki 1.5.MediaWiki version: 1.5
在nadp裡面,被分割成「user_rights」資料表。
+----------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-----------------+------+-----+---------+-------+ | ug_user | int(5) unsigned | NO | PRI | 0 | | | ug_group | char(16) | NO | PRI | NULL | | +----------+-----------------+------+-----+---------+-------+
In a default mediaWiki installation, ug_group can be one of the following :
query : SELECT DISTINCT ug_group FROM user_groups; +------------+ | ug_group | +------------+ | bot | | bureaucrat | | checkuser | | developer | | steward | | sysop | +------------+
[編輯] User newtalk table
mysql> describe mw_user_newtalk; +---------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | user_id | int(5) | NO | MUL | 0 | | | user_ip | varchar(40) | NO | MUL | NULL | | +---------+-------------+------+-----+---------+-------+ 2 rows in set (0.03 sec)
[編輯] Validate table
It is was, and still is used as part of Extension:Review, however, no core software needs it.