wiki.techinc.nl/maintenance/archives/patch-fa_sha1.sql
umherirrender fb2c1c645b Add separate fa_sha1 field to filearchive table
This allows sha1 searches with the api in miser mode for deleted files

Added script to populate the rows
Adding new field to selects and handle it in all places, where needed

Using a 10 byte index for the new field per
http://lists.wikimedia.org/pipermail/wikitech-l/2012-September/063429.html

Change-Id: Ie54a513fe361202e63df44be44a0fdd91926c974
2012-10-14 20:58:25 +02:00

4 lines
199 B
SQL

-- Add fa_sha1 and related index
ALTER TABLE /*$wgDBprefix*/filearchive
ADD COLUMN fa_sha1 varbinary(32) NOT NULL default '';
CREATE INDEX /*i*/fa_sha1 ON /*$wgDBprefix*/filearchive (fa_sha1(10));