From e9e23d0387986a68ec0b765c4114a1bb5cda622a Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 19 Mar 2008 14:27:00 +0000 Subject: [PATCH] Wrong index, should be unique. Thanks Simmetrical. --- maintenance/postgres/archives/patch-category.sql | 3 ++- maintenance/postgres/tables.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/maintenance/postgres/archives/patch-category.sql b/maintenance/postgres/archives/patch-category.sql index 9986cdaf6e..5e0d620f5c 100644 --- a/maintenance/postgres/archives/patch-category.sql +++ b/maintenance/postgres/archives/patch-category.sql @@ -10,5 +10,6 @@ CREATE TABLE category ( cat_hidden SMALLINT NOT NULL DEFAULT 0 ); -CREATE INDEX category_title ON category(cat_title, cat_pages); +CREATE UNIQUE INDEX category_title ON category(cat_title); +CREATE INDEX category_pages ON category(cat_pages); diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 521458a6cf..4557150da5 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -544,7 +544,8 @@ CREATE TABLE category ( cat_files INTEGER NOT NULL DEFAULT 0, cat_hidden SMALLINT NOT NULL DEFAULT 0 ); -CREATE INDEX category_title ON category(cat_title, cat_pages); +CREATE UNIQUE INDEX category_title ON category(cat_title); +CREATE INDEX category_pages ON category(cat_pages); CREATE TABLE mediawiki_version ( type TEXT NOT NULL, -- 2.20.1