Maintenance script "populate­Hash­Field.php"

From semantic-mediawiki.org
populateHashField.php
Allows to do mass populating of database field "smw_hash" when initially upgrading to Semantic MediaWiki 3.0.1 and later
Further Information
Provided by: Semantic MediaWiki
Added: 3.0.1
Removed: still in use
Location (path): ./extensions/SemanticMediaWiki/maintenance/
Table of Contents

The "populateHashField.php" maintenance script allows mass conversions of database field "smw_hash" in the in the "smw_object_ids" database table when initially upgrading to Semantic MediaWiki 3.0.1Released on 25 January 2019 and compatible with MW 1.27.0 - 1.31.x. or later and only has to be run once. As soon as you have successfully upgraded it will no longer be necessary to use it. The maintenance script was introduced in Semantic MediaWiki 3.0.1Released on 25 January 2019 and compatible with MW 1.27.0 - 1.31.x..1

Note[edit]

During an upgrade to Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. and later some elements of the database table may require to be updated and pending its importance it has to happen before any access to that table occurs. However due to the sheer size of the "smw_objects_ids" database table the update of database field "smw_hash" could hog resources making maintenance script "update.php" (MediaWiki.org) or alternatively maintenance script "setupStore.php"Allows to set up the data backend/store run for a considerable time.

To mitigate this the initial update of database field "smw_hash"2 which only happens once when initially switching to Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. and later will be executed with a set threshold of 200,000 database table rows (meaning missing converted rows) for the conversion during the normal usage of "update.php" or alternatively "setupStore.php" to allow system administrators to quickly run the upgrade. Hereafter the process is postponed and the need to continue running this maintenance script is visibly displayed by an error message on every page of the wiki informing that the wiki's system administrator still has to run the script to complete the upgrade. Once this maintenance script was run as a follow up to "update.php" or alternatively "setupStore.php" the will no longer appear and the upgrade of the software was completed.

Usage[edit]

php populateHashField.php

Parameters[edit]

Maintenance scripts provide generic maintenance parameters, script dependent parameters and depending on the maintenance script script specific parameters which are described on this page if provided.

This script does not provide any script specific parameters.

Example[edit]

The following command populates the "smw_hash" field in the "smw_objects_ids" database table
php populateHashField.php
Checking smw_hash field consistency ...
   ... all rows populated ...

   ... writing the upgrade file ... 
   ... done.

See also[edit]


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3611
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:3080