Add page_restrictions table.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 11 Jan 2007 15:57:41 +0000 (15:57 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 11 Jan 2007 15:57:41 +0000 (15:57 +0000)
maintenance/postgres/tables.sql

index 00d8259..8126ceb 100644 (file)
@@ -108,6 +108,17 @@ CREATE TABLE pagecontent ( -- replaces reserved word 'text'
 );
 
 
+CREATE TABLE page_restrictions (
+  pr_page      INTEGER       NULL  REFERENCES page (page_id) ON DELETE CASCADE,
+  pr_type   TEXT         NOT NULL,
+  pr_level  TEXT         NOT NULL,
+  pr_cascade SMALLINT    NOT NULL,
+  pr_user   INTEGER          NULL,
+  pr_expiry TIMESTAMPTZ      NULL
+);
+ALTER TABLE page_restrictions ADD CONSTRAINT page_restrictions_pk PRIMARY KEY (pr_page,pr_type);
+
+
 CREATE TABLE archive2 (
   ar_namespace   SMALLINT     NOT NULL,
   ar_title       TEXT         NOT NULL,