summaryrefslogtreecommitdiff
path: root/maintenance/archives/patch-fix-il_from.sql
blob: 0a199e4d33f714f996c042aa6d759d18204ad029 (plain)
1
2
3
4
5
6
7
8
9
10
11
-- Fix a bug from the 1.2 -> 1.3 upgrader by moving away the imagelinks table
-- and recreating it.
RENAME TABLE /*_*/imagelinks TO /*_*/imagelinks_old;
CREATE TABLE /*_*/imagelinks (
  il_from int unsigned NOT NULL default 0,
  il_to varchar(255) binary NOT NULL default ''
) /*$wgDBTableOptions*/;

CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to);
CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from);