1 CREATE TYPE link_type AS ENUM ('page', 'subcat', 'file');
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 );