Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5043
postgrespatch.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:17 PM
2014-11-21 22:17:33 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
postgrespatch.txt
View Options
Index: postgres/tables.sql
===================================================================
--- postgres/tables.sql (revision 41400)
+++ postgres/tables.sql (working copy)
@@ -572,3 +572,37 @@
INSERT INTO mediawiki_version (type,mw_version,sql_version,sql_date)
VALUES ('Creation','??','$LastChangedRevision$','$LastChangedDate$');
+CREATE SEQUENCE user_restrictions_ur_id_seq MINVALUE 0 START WITH 0;
+CREATE TABLE user_restrictions (
+
+ ur_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('user_restrictions_ur_id_seq'),
+
+ -- Restriction type. Block from either editing namespace or page
+ ur_type TEXT NOT NULL,
+ -- Namespace to restrict if ur_type = namespace
+ ur_namespace INTEGER default NULL,
+ -- Page to restrict if ur_type = page
+ ur_page_namespace INTEGER default NULL,
+ ur_page_title TEXT default '',
+
+ -- User that is restricted
+ ur_user INTEGER NOT NULL,
+ ur_user_text TEXT NOT NULL,
+
+ -- User who has done this restriction
+ ur_by INTEGER NOT NULL,
+ ur_by_text TEXT NOT NULL default '',
+ -- Reason for this restriction
+ ur_reason TEXT NOT NULL,
+
+ -- Time when this restriction was made
+ ur_timestamp TEXT NOT NULL default '',
+ -- Expiry or "infinity"
+ ur_expiry TEXT NOT NULL default ''
+);
+CREATE INDEX user_restrictions_ur_user ON user_restrictions (ur_user,ur_user_text);
+CREATE INDEX user_restrictions_ur_type ON user_restrictions (ur_type,ur_timestamp);
+CREATE INDEX user_restrictions_ur_namespace ON user_restrictions (ur_namespace,ur_timestamp);
+CREATE INDEX user_restrictions_ur_page ON user_restrictions (ur_page_namespace,ur_page_title,ur_timestamp);
+CREATE INDEX user_restrictions_ur_timestamp ON user_restrictions (ur_timestamp);
+CREATE INDEX user_restrictions_ur_expiry ON user_restrictions (ur_expiry);
Index: updaters.inc
===================================================================
--- updaters.inc (revision 41400)
+++ updaters.inc (working copy)
@@ -1450,6 +1450,7 @@
array("protected_titles", "patch-protected_titles.sql"),
array("redirect", "patch-redirect.sql"),
array("updatelog", "patch-updatelog.sql"),
+ array("user_restrictions", "patch-user_restrictions.sql"),
);
$newcols = array(
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4606
Default Alt Text
postgrespatch.txt (2 KB)
Attached To
Mode
T17756: Revision r41352 only updates MySQL
Attached
Detach File
Event Timeline
Log In to Comment