Add protected_titles table.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 16 Dec 2007 15:32:34 +0000 (15:32 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 16 Dec 2007 15:32:34 +0000 (15:32 +0000)
maintenance/postgres/archives/patch-protected_titles.sql [new file with mode: 0644]
maintenance/postgres/tables.sql
maintenance/updaters.inc

diff --git a/maintenance/postgres/archives/patch-protected_titles.sql b/maintenance/postgres/archives/patch-protected_titles.sql
new file mode 100644 (file)
index 0000000..0dc4c1b
--- /dev/null
@@ -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);
index ef88503..93bcf18 100644 (file)
@@ -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$');
 
-
index 97267a0..9f7ce2a 100644 (file)
@@ -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"),
        );