Fixing a bug in r97495 that Aaron catched. I misinterpreted the documentation for...
[mediawiki.git] / maintenance / postgres / archives / patch-categorylinks-better-collation.sql
blobb3fa63464567a656fdb14307d0c8cfb9c2960f8b
1 CREATE TYPE link_type AS ENUM ('page', 'subcat', 'file');
2 DROP INDEX cl_sortkey;
3 ALTER TABLE categorylinks
4         ADD COLUMN cl_sortkey_prefix TEXT NOT NULL DEFAULT '',
5         ADD COLUMN cl_collation SMALLINT NOT NULL DEFAULT 0,
6         ADD COLUMN cl_type link_type NOT NULL DEFAULT 'page';
7 CREATE INDEX cl_collation ON categorylinks ( cl_collation );
8 CREATE INDEX cl_sortkey ON categorylinks ( cl_to, cl_type, cl_sortkey, cl_from );