After this switch, property terms will be written to both old store (wb_terms table) and the new one (wbt_text, wbt_type, wbt_text_in_lang, wbt_term_in_lang and wbt_property_terms).
Order of SWAT patches:
- Switch property terms migration to WRITE_NEW on test wikidata (test on test wikidata, see next section) - https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/519211
- Switch property terms migration to WRITE_NEW on wikidata production (test on production wikidata, see next section) - https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/519212
How to test changes in SWAT
You need access to test and production (at least to run maintenance/sql.php to execute some sql)
Testing write logic (should be writing to both still)
- Add/Update a property labels/descriptions/aliases in different languages of a property (use sandbox property on production https://www.wikidata.org/wiki/Property:P2368)
- Check new terms store tables for the data. Here's a helper sql query to run to get all terms of that property from new store tables:
SELECT wbxl_language as term_language, wby_name as term_type, wbx_text as term_text FROM wbt_property_terms INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id INNER JOIN wbt_type ON wbtl_type_id = wby_id INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id INNER JOIN wbt_text ON wbxl_text_id = wbx_id WHERE wbpt_property_id = 123 -- put here the numeric property id (without the P prefix) ;
Testing read logic (should be reading from new store first)
- Using sandbox property https://www.wikidata.org/wiki/Property:P2368
- Clear all cached terms of that property
TBD @Ladsgroup @Lucas_Werkmeister_WMDE @hoo is there a quick/easy way to do that?
- Hide all terms of that property from wb_terms table (you can use sql wikidatawiki or mwscript sql.php wikidatawiki to execute sql):
UPDATE wb_terms SET term_full_entity_id = "hidden_P2368" WHERE term_full_entity_id = "P2368";
- go over the use cases.. properties should render properly:
Use Cases to test
- Rendering property labels in statements blocks (uses PropertyLabelResolver).
- Rendering property labels & descriptions in search results when searching for a property when adding a statement (users PrefetchingTermLookup).
- Rendering property labels on Special:AllPages?namespace=122 (or 120 depending on wiki configuration)
- Rendering property labels on Special:RecentChanges
- ...