Manual:UpdateCollation.php/ja

MediaWiki バージョン:
1.19
Category:MediaWiki code/ja#UpdateCollation.php

詳細

This script updates category collations. You need to run this script after $wgCategoryCollation has been changed. It is also needed to be run after upgrading to 1.17 and later from a version of MediaWiki before 1.17. Normally it is run as part of update.php.

If your category collations are messed up (aka things sort incorrectly in categories), you can use the --force switch to forcibly fix all the category collations.

The run time of the script depends on the number of rows in the categorylinks table, and for extremely large wikis may take over 24 hours. (A run on the English Wikipedia in September 2016 took around a week: phab:T136150.) The script can process on the order of 10,000 rows per minute (depending on your setup); you can view the estimated number of rows on your wiki before running the real script by using updateCollation.php --dry-run. Wikimedia wikis of various sizes have been painlessly switched to different collations over time (phab:T47443), just make sure to estimate how long the script will run before you start it.

オプション/引数

オプション説明必須かどうか
--forceRun on all rows, even if the collation is supposed to be up-to-date.省略可能
--previous-collation Set the previous value of $wgCategoryCollation here to speed up this script, especially if your categorylinks table is large. This will only update rows with that collation, though, so it may miss out-of-date rows with a different, even older collation. 省略可能
--target-collation Set this to the new collation type to use instead of $wgCategoryCollation. Usually you should not use this, you should just update $wgCategoryCollation in LocalSettings.php. 省略可能
--target-tableCopy rows from categorylinks into the specified table instead of updating them in place.省略可能
--remoteUse Shellbox to calculate the new sort keys remotely.省略可能
--dry-runDon't actually change the collations, just compile statistics.省略可能
--verbose-statsShow more statistics.省略可能

使用法

php maintenance/run.php updateCollation [ --force| --previous-collation| --target-collation| --target-table| --remote| --dry-run| --verbose-stats ]
MediaWiki バージョン 1.39.12 以前では、メンテナンス スクリプトを php maintenance/run.php scriptName ではなく php maintenance/scriptName.php を使用して実行する必要があります。

Dry run to check updates

Terminal

Updating category collations

Terminal

関連項目

Category:Maintenance scripts/ja Category:Content maintenance scripts/ja
Category:Content maintenance scripts/ja Category:Maintenance scripts/ja Category:MediaWiki code/ja