Reconcept cl_raw_sortkey as cl_sortkey_prefix
[lhc/web/wiklou.git] / maintenance / archives / patch-categorylinks-better-collation.sql
1 --
2 -- patch-categorylinks-better-collation.sql
3 --
4 -- Bugs 164, 1211, 23682. This is currently experimental and subject to
5 -- change. You need to set $wgExperimentalCategorySort = true; to use this.
6 -- You also need to manually apply any changes that are made to this file,
7 -- since they will not be automatically applied. This patch is only intended
8 -- to work for MySQL for now, without table prefixes, possibly other random
9 -- limitations.
10 ALTER TABLE categorylinks
11 ADD COLUMN cl_sortkey_prefix varchar(255) binary NOT NULL default '',
12 ADD COLUMN cl_collation tinyint NOT NULL default 0,
13 ADD COLUMN cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page',
14 ADD INDEX (cl_collation),
15 DROP INDEX cl_sortkey,
16 ADD INDEX cl_sortkey (cl_to, cl_type, cl_sortkey, cl_from);