From: Greg Sabino Mullane Date: Sun, 16 Dec 2007 23:35:14 +0000 (+0000) Subject: Yet more cleanup of the protected_titles stuff. X-Git-Tag: 1.31.0-rc.0~50384 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=ad76180546dbd15e5f947c69cc2fc3946bdfe388;p=lhc%2Fweb%2Fwiklou.git Yet more cleanup of the protected_titles stuff. --- diff --git a/maintenance/postgres/archives/patch-protected_titles.sql b/maintenance/postgres/archives/patch-protected_titles.sql index 0dc4c1bd1c..93f10e44f5 100644 --- a/maintenance/postgres/archives/patch-protected_titles.sql +++ b/maintenance/postgres/archives/patch-protected_titles.sql @@ -1,11 +1,10 @@ CREATE TABLE protected_titles ( pt_namespace SMALLINT NOT NULL, pt_title TEXT NOT NULL, - pt_by INTEGER NOT NULL, - pt_reason TEXT, + pt_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, + pt_reason TEXT NULL, pt_timestamp TIMESTAMPTZ NOT NULL, pt_expiry TIMESTAMPTZ NULL, pt_create_perm TEXT NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX protected_titles_unique ON protected_titles(pt_namespace, pt_title); -CREATE INDEX protected_titles_index ON protected_titles(pt_by, pt_timestamp); diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 93bcf18fa2..1d05c51fa8 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -509,14 +509,13 @@ CREATE UNIQUE INDEX pf_name_server ON profiling (pf_name, pf_server); CREATE TABLE protected_titles ( pt_namespace SMALLINT NOT NULL, pt_title TEXT NOT NULL, - pt_by INTEGER NOT NULL, - pt_reason TEXT, + pt_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, + pt_reason TEXT NULL, pt_timestamp TIMESTAMPTZ NOT NULL, pt_expiry TIMESTAMPTZ NULL, pt_create_perm TEXT NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX protected_titles_unique ON protected_titles(pt_namespace, pt_title); -CREATE INDEX protected_titles_index ON protected_titles(pt_by, pt_timestamp); CREATE TABLE mediawiki_version ( type TEXT NOT NULL,