Maintenance script "update­Entity­Collation.php"

From semantic-mediawiki.org
updateEntityCollation.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/Semantic­MediaWiki/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 an unknown date and compatible with MW 1.27.0 - 1.30.x..1

Usage

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

Parameters

Generic parameters

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. https://www.semantic-mediawiki.org. This is sometimes necessary because server name detection may fail in command line scripts.

Script dependant parameters

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.

Example

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)

References

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