* Schema changes - add id fields to page_restrictions and logging tables for future functionality (log entry deletion, rewrite of Special:Protectedpages)
[RELEASE-NOTES update to come from another computer, something funky's going on with another line in RELEASE-NOTES]
This commit is contained in:
parent
d2a3135818
commit
8b9f01ed98
4 changed files with 24 additions and 0 deletions
8
maintenance/archives/patch-log_id.sql
Normal file
8
maintenance/archives/patch-log_id.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-- Log_id field that means one log entry can be referred to with a single number,
|
||||
-- rather than a dirty great big mess of features.
|
||||
-- This might be useful for single-log-entry deletion, et cetera.
|
||||
-- Andrew Garrett, February 2007.
|
||||
|
||||
ALTER TABLE logging
|
||||
ADD COLUMN log_id SERIAL,
|
||||
ADD PRIMARY KEY log_id (log_id);
|
||||
8
maintenance/archives/patch-page_restrictions_sortkey.sql
Normal file
8
maintenance/archives/patch-page_restrictions_sortkey.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-- Add a sort-key to page_restrictions table.
|
||||
-- First immediate use of this is as a sort-key for coming modifications
|
||||
-- of Special:Protectedpages.
|
||||
-- Andrew Garrett, February 2007
|
||||
|
||||
ALTER TABLE page_restrictions
|
||||
ADD COLUMN pr_id SERIAL,
|
||||
ADD UNIQUE KEY pr_id (pr_id);
|
||||
|
|
@ -982,6 +982,10 @@ CREATE TABLE /*$wgDBprefix*/logging (
|
|||
-- LF separated list of miscellaneous parameters
|
||||
log_params blob NOT NULL,
|
||||
|
||||
-- Log ID, for referring to this specific log entry, probably for deletion and such.
|
||||
log_id int unsigned not null auto_increment,
|
||||
|
||||
PRIMARY KEY log_id (log_id),
|
||||
KEY type_time (log_type, log_timestamp),
|
||||
KEY user_time (log_user, log_timestamp),
|
||||
KEY page_time (log_namespace, log_title, log_timestamp),
|
||||
|
|
@ -1089,9 +1093,12 @@ CREATE TABLE /*$wgDBprefix*/page_restrictions (
|
|||
pr_user int(8) NULL,
|
||||
-- Field for time-limited protection.
|
||||
pr_expiry char(14) binary NULL,
|
||||
-- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)
|
||||
pr_id int unsigned not null auto_increment,
|
||||
|
||||
PRIMARY KEY (pr_page,pr_type),
|
||||
|
||||
UNIQUE KEY pr_id (pr_id),
|
||||
KEY pr_page (pr_page),
|
||||
KEY pr_typelevel (pr_type,pr_level),
|
||||
KEY pr_level (pr_level),
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ $wgNewFields = array(
|
|||
array( 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ),
|
||||
array( 'user', 'user_newpass_time','patch-user_newpass_time.sql' ),
|
||||
array( 'user', 'user_editcount', 'patch-user_editcount.sql' ),
|
||||
array( 'logging', 'log_id', 'patch-log_id.sql' ),
|
||||
);
|
||||
|
||||
function rename_table( $from, $to, $patch ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue