diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /maintenance/archives | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'maintenance/archives')
-rw-r--r-- | maintenance/archives/patch-cat_hidden.sql | 3 | ||||
-rw-r--r-- | maintenance/archives/patch-filejournal.sql | 20 | ||||
-rw-r--r-- | maintenance/archives/patch-ipb-parent-block-id-index.sql | 2 | ||||
-rw-r--r-- | maintenance/archives/patch-ipb-parent-block-id.sql | 3 | ||||
-rw-r--r-- | maintenance/archives/patch-revision-user-page-index.sql | 4 | ||||
-rw-r--r-- | maintenance/archives/upgradeLogging.php | 24 |
6 files changed, 47 insertions, 9 deletions
diff --git a/maintenance/archives/patch-cat_hidden.sql b/maintenance/archives/patch-cat_hidden.sql new file mode 100644 index 00000000..933188ce --- /dev/null +++ b/maintenance/archives/patch-cat_hidden.sql @@ -0,0 +1,3 @@ +-- cat_hidden is no longer used, delete it + +ALTER TABLE /*$wgDBprefix*/category DROP COLUMN cat_hidden; diff --git a/maintenance/archives/patch-filejournal.sql b/maintenance/archives/patch-filejournal.sql new file mode 100644 index 00000000..4356d70d --- /dev/null +++ b/maintenance/archives/patch-filejournal.sql @@ -0,0 +1,20 @@ +-- File backend operation journal +CREATE TABLE /*_*/filejournal ( + -- Unique ID for each file operation + fj_id bigint unsigned NOT NULL PRIMARY KEY auto_increment, + -- UUID of the batch this operation belongs to + fj_batch_uuid varbinary(32) NOT NULL, + -- The registered file backend name + fj_backend varchar(255) NOT NULL, + -- The storage path that was affected (may be internal paths) + fj_path blob NOT NULL, + -- Primitive operation description (create/update/delete) + fj_op varchar(16) NOT NULL default '', + -- SHA-1 file content hash in base-36 + fj_new_sha1 varbinary(32) NOT NULL default '', + -- Timestamp of the batch operation + fj_timestamp varbinary(14) NOT NULL default '' +) /*$wgDBTableOptions*/; + +CREATE INDEX /*i*/fj_batch_id ON /*_*/filejournal (fj_batch_uuid); +CREATE INDEX /*i*/fj_timestamp ON /*_*/filejournal (fj_timestamp); diff --git a/maintenance/archives/patch-ipb-parent-block-id-index.sql b/maintenance/archives/patch-ipb-parent-block-id-index.sql new file mode 100644 index 00000000..1f413f37 --- /dev/null +++ b/maintenance/archives/patch-ipb-parent-block-id-index.sql @@ -0,0 +1,2 @@ +-- index for ipblocks.ipb_parent_block_id +CREATE INDEX /*i*/ipb_parent_block_id ON /*_*/ipblocks (ipb_parent_block_id); diff --git a/maintenance/archives/patch-ipb-parent-block-id.sql b/maintenance/archives/patch-ipb-parent-block-id.sql new file mode 100644 index 00000000..8ebcf786 --- /dev/null +++ b/maintenance/archives/patch-ipb-parent-block-id.sql @@ -0,0 +1,3 @@ +-- Adding ipb_parent_block_id to track the block that caused an autoblock +ALTER TABLE /*$wgDBprefix*/ipblocks + ADD ipb_parent_block_id int DEFAULT NULL; diff --git a/maintenance/archives/patch-revision-user-page-index.sql b/maintenance/archives/patch-revision-user-page-index.sql new file mode 100644 index 00000000..a4554c8f --- /dev/null +++ b/maintenance/archives/patch-revision-user-page-index.sql @@ -0,0 +1,4 @@ +-- New index on revision table to allow searches for all edits by a given user +-- to a given page. Added 2007-08-28 + +CREATE INDEX /*i*/page_user_timestamp ON /*_*/revision (rev_page,rev_user,rev_timestamp); diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php index 1765bd9f..2c28011b 100644 --- a/maintenance/archives/upgradeLogging.php +++ b/maintenance/archives/upgradeLogging.php @@ -1,6 +1,6 @@ <?php /** - * Replication-safe online upgrade script for log_id/log_deleted + * Replication-safe online upgrade for log_id/log_deleted fields. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,14 @@ * @ingroup MaintenanceArchive */ -require( dirname( __FILE__ ) . '/../commandLine.inc' ); +require( __DIR__ . '/../commandLine.inc' ); +/** + * Maintenance script that upgrade for log_id/log_deleted fields in a + * replication-safe way. + * + * @ingroup Maintenance + */ class UpdateLogging { /** @@ -63,21 +69,21 @@ CREATE TABLE $logging_1_10 ( -- action field, but only the type controls categorization. log_type varbinary(10) NOT NULL default '', log_action varbinary(10) NOT NULL default '', - + -- Timestamp. Duh. log_timestamp binary(14) NOT NULL default '19700101000000', - + -- The user who performed this action; key to user_id log_user int unsigned NOT NULL default 0, - + -- Key to the page affected. Where a user is the target, -- this will point to the user page. log_namespace int NOT NULL default 0, log_title varchar(255) binary NOT NULL default '', - + -- Freeform text. Interpreted as edit history comments. log_comment varchar(255) NOT NULL default '', - + -- LF separated list of miscellaneous parameters log_params blob NOT NULL, @@ -124,7 +130,7 @@ EOT; $minTs = $this->dbw->selectField( $srcTable, 'MIN(log_timestamp)', false, __METHOD__ ); $minTsUnix = wfTimestamp( TS_UNIX, $minTs ); $numRowsCopied = 0; - + while ( true ) { $maxTs = $this->dbw->selectField( $srcTable, 'MAX(log_timestamp)', false, __METHOD__ ); $copyPos = $this->dbw->selectField( $dstTable, 'MAX(log_timestamp)', false, __METHOD__ ); @@ -137,7 +143,7 @@ EOT; $percent = ( $copyPosUnix - $minTsUnix ) / ( $maxTsUnix - $minTsUnix ) * 100; } printf( "%s %.2f%%\n", $copyPos, $percent ); - + # Handle all entries with timestamp equal to $copyPos if ( $copyPos !== null ) { $numRowsCopied += $this->copyExactMatch( $srcTable, $dstTable, $copyPos ); |