From 12cffaa3b5d0cb4ec5d1b84fc49b7f96e42e0b75 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sun, 16 Dec 2007 15:32:34 +0000 Subject: [PATCH] Add protected_titles table. --- .../postgres/archives/patch-protected_titles.sql | 11 +++++++++++ maintenance/postgres/tables.sql | 12 +++++++++++- maintenance/updaters.inc | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 maintenance/postgres/archives/patch-protected_titles.sql diff --git a/maintenance/postgres/archives/patch-protected_titles.sql b/maintenance/postgres/archives/patch-protected_titles.sql new file mode 100644 index 0000000000..0dc4c1bd1c --- /dev/null +++ b/maintenance/postgres/archives/patch-protected_titles.sql @@ -0,0 +1,11 @@ +CREATE TABLE protected_titles ( + pt_namespace SMALLINT NOT NULL, + pt_title TEXT NOT NULL, + pt_by INTEGER NOT NULL, + pt_reason TEXT, + 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 ef88503020..93bcf18fa2 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -506,6 +506,17 @@ CREATE TABLE profiling ( ); 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_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, @@ -528,4 +539,3 @@ CREATE TABLE mediawiki_version ( INSERT INTO mediawiki_version (type,mw_version,sql_version,sql_date) VALUES ('Creation','??','$LastChangedRevision$','$LastChangedDate$'); - diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 97267a09bf..9f7ce2a29f 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -1325,6 +1325,7 @@ function do_postgres_updates() { array("querycachetwo", "patch-querycachetwo.sql"), array("page_restrictions", "patch-page_restrictions.sql"), array("profiling", "patch-profiling.sql"), + array("protected_titles", "patch-protected_titles.sql"), array("redirect", "patch-redirect.sql"), ); -- 2.20.1