Maintenance script "update­Entity­Collation.php"

Allows to do mass updates of database field "smw_sort" on the occasion that setting for the entity collation was changed
Further Information
Provided by: Semantic MediaWiki
Added: 3.0.0
Removed: still in use
Location (path): ./extensions/SemanticMediaWiki/maintenance/
Table of Contents

The "updateEntityCollation.php" maintenance script allows mass updates of database field "smw_sort" on the occasion that the setting of configuration parameter $smwgEntityCollationSets which collation entities in Semantic MediaWiki should sort with was changed. The maintenance script was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1


php updateEntityCollation.php
NoteNote: This script does not have any script specific parameters.


Generic parameters[edit]

Parameter Description
--help (-h) Display this help message
--quiet (-q) Whether to supress non-error output
--conf: Location of "LocalSettings.php", if not default
--wiki For specifying the wiki ID
--globals Output globals at the end of processing for debugging
--memory-limit Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it
--server: The protocol and server name to use in URLs, e.g. This is sometimes necessary because server name detection may fail in command line scripts.

Script dependant parameters[edit]

Parameter Description
--dbuser The DB user to use for this script
--dbpass The password to use for this script

If Semantic MediaWiki is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set. See README in the maintenance directory.


The following command updates the entity collation of the "smw_sort" field.
php updateEntityCollation.php
[ Notes ]

- $smwgEntityCollation              uca-default-u-kn
- $wgCategoryCollation              numeric

The setting of $smwgEntityCollation and $wgCategoryCollation are different
and may result in an inconsitent sorting display for entities.

[ Update ]

- Selecting rows ...                1 to 100659
- Updating the smw_sort field ...     0% (313/100659)


  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2429