WikibaseLexeme
MediaWiki WikibaseLexeme extension
Loading...
Searching...
No Matches
Wikibase\Lexeme\Maintenance\FixPagePropsSortkey Class Reference

Maintenance script to fix the pp_sortkey column of the page_props table for pp_propname wb-claims, wbl-forms and wbl-senses. More...

+ Inheritance diagram for Wikibase\Lexeme\Maintenance\FixPagePropsSortkey:
+ Collaboration diagram for Wikibase\Lexeme\Maintenance\FixPagePropsSortkey:

Public Member Functions

 __construct ()
 
 doDBUpdates ()
 

Protected Member Functions

 getUpdateKey ()
 

Detailed Description

Maintenance script to fix the pp_sortkey column of the page_props table for pp_propname wb-claims, wbl-forms and wbl-senses.

Due to a bug (T350224), some lexemes had their pp_sortkey set to NULL, rather than the number of statements, forms or senses. To fix this, set the pp_sortkey based on the (assumed correct) pp_value. Note that we do not limit this to the Lexeme namespace (no JOIN with the page table): the pp_sortkey is not expected to be NULL anywhere else, but even if it is, setting it to the numerical value of the pp_value should be correct. (But we only do this for the three pp_propname strings known to be affected, not any random other page prop.)

Usually, this script is run via update.php and there is no need to run it manually.

This maintenance script can be removed again after a while (once we assume all installations have run this script to fix their old data). The bug was first introduced in the REL1_39 branch (MediaWiki 1.39).

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lexeme\Maintenance\FixPagePropsSortkey::__construct ( )

Member Function Documentation

◆ doDBUpdates()

Wikibase\Lexeme\Maintenance\FixPagePropsSortkey::doDBUpdates ( )

◆ getUpdateKey()

Wikibase\Lexeme\Maintenance\FixPagePropsSortkey::getUpdateKey ( )
protected

The documentation for this class was generated from the following file: