From: OverlordQ Date: Sat, 24 Jul 2010 21:44:16 +0000 (+0000) Subject: Followup to r69817, r69810 add PG patch file, defaults to cl_type of PAGE. X-Git-Tag: 1.31.0-rc.0~35963 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=f7743f995771b70e7004e652c17cf4e3b662e2cb;p=lhc%2Fweb%2Fwiklou.git Followup to r69817, r69810 add PG patch file, defaults to cl_type of PAGE. --- diff --git a/maintenance/postgres/archives/patch-categorylinks-better-collation.sql b/maintenance/postgres/archives/patch-categorylinks-better-collation.sql new file mode 100644 index 0000000000..29a2d29015 --- /dev/null +++ b/maintenance/postgres/archives/patch-categorylinks-better-collation.sql @@ -0,0 +1,8 @@ +CREATE TYPE link_type AS ENUM ('page', 'subcat', 'file'); +DROP INDEX cl_sortkey; +ALTER TABLE categorylinks + ADD COLUMN cl_raw_sortkey TEXT NULL DEFAULT NULL, + ADD COLUMN cl_collation SMALLINT NOT NULL DEFAULT 0, + ADD COLUMN cl_type link_type NOT NULL DEFAULT 'page'; +CREATE INDEX cl_collation ON categorylinks ( cl_collation ); +CREATE INDEX cl_sortkey ON categorylinks ( cl_to, cl_type, cl_sortkey, cl_from );