Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / maintenance / archives / patch-categorylinks-better-collation.sql
1 --
2 -- patch-categorylinks-better-collation.sql
3 --
4 -- T2164, T3211, T25682. This is the second version of this patch; the
5 -- changes are also incorporated into patch-categorylinks-better-collation2.sql,
6 -- for the benefit of trunk users who applied the original.
7 --
8 -- Due to T27254, the length limit of 255 bytes for cl_sortkey_prefix
9 -- is also enforced in php. If you change the length of that field, make
10 -- sure to also change the check in LinksUpdate.php.
11 ALTER TABLE /*$wgDBprefix*/categorylinks
12 CHANGE COLUMN cl_sortkey cl_sortkey varbinary(230) NOT NULL default '',
13 ADD COLUMN cl_sortkey_prefix varchar(255) binary NOT NULL default '',
14 ADD COLUMN cl_collation varbinary(32) NOT NULL default '',
15 ADD COLUMN cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page',
16 -- rm'd in 1.27 ADD INDEX (cl_collation),
17 DROP INDEX cl_sortkey,
18 ADD INDEX cl_sortkey (cl_to, cl_type, cl_sortkey, cl_from);
19 INSERT IGNORE INTO /*$wgDBprefix*/updatelog (ul_key) VALUES ('cl_fields_update');