wiki.techinc.nl/maintenance/postgres/update-keys.sql
Jeff c1371e7f54 PostgreSQL: Fix text search on moved pages
When a page is updated under PostgreSQL, there is code to
de-index all but the most recent version of the page.  But
when a page is moved, it was accidentally de-indexing the
most recent version as well, because rev_text_id is not
incremented in that case.  A simple tweak to the SQL
fixes that.

I added code to the update script to find pages
previously corrupted by this problem and reindex them.

Bug: 66650
Change-Id: I52e1bbbd8592be5e7c7383c225e6b4c19bbe5b9e
2015-02-17 18:15:23 -08:00

34 lines
1.6 KiB
SQL

-- SQL to insert update keys into the initial tables after a
-- fresh installation of MediaWiki's database.
-- This is read and executed by the install script; you should
-- not have to run it by itself unless doing a manual install.
-- Insert keys here if either the unnecessary would cause heavy
-- processing or could potentially cause trouble by lowering field
-- sizes, adding constraints, etc.
-- When adjusting field sizes, it is recommended removing old
-- patches but to play safe, update keys should also inserted here.
-- The /*_*/ comments in this and other files are
-- replaced with the defined table prefix by the installer
-- and updater scripts. If you are installing or running
-- updates manually, you will need to manually insert the
-- table prefix if any when running these scripts.
--
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null );
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'image-img_major_mime-patch-img_major_mime-chemical.sql', null );
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null );
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null );
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null );
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'user_properties-up_property-patch-up_property.sql', null );
-- PostgreSQL-specific patches.
INSERT INTO /*_*/updatelog (ul_key, ul_value)
VALUES( 'patch-textsearch_bug66650.sql', null );