Revert 25602 and 25604 schema changes for now.
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 7 Sep 2007 13:30:28 +0000 (13:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 7 Sep 2007 13:30:28 +0000 (13:30 +0000)
Please don't commit schema changes to trunk until you've cleared them with me and Tim -- remember trunk is meant to be ready-to-run live at all times.
They force operational work before we can update the software again, and it's a big pain in the ass to deal with them unexpectedly.

includes/Article.php
maintenance/archives/patch-rev_bot.sql [deleted file]
maintenance/archives/patch-revision-user-page-index.sql [deleted file]
maintenance/tables.sql
maintenance/updaters.inc

index 0e51faf..7ba55c5 100644 (file)
@@ -2463,8 +2463,8 @@ class Article {
         *
         * @param Revision $rev
         *
-        * @todo This is a lousy interface function. Kill it and replace the
-        * other cruddy functions like editUpdates and such so it's not needed
+        * @todo This is a shitty interface function. Kill it and replace the
+        * other shitty functions like editUpdates and such so it's not needed
         * anymore.
         */
        function createUpdates( $rev ) {
diff --git a/maintenance/archives/patch-rev_bot.sql b/maintenance/archives/patch-rev_bot.sql
deleted file mode 100644 (file)
index 12bb5db..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
--- Add rev_bot column.  We don't need an index if all we want to be able to do
--- is, e.g., hide bot edits: most edits are non-bot, so for normal use it's
--- better to just look at 20% more rows or whatever than to add a new index.
-ALTER TABLE /*$wgDBprefix*/revision
-  ADD COLUMN rev_bot tinyint unsigned NOT NULL default 0 AFTER rev_deleted;
diff --git a/maintenance/archives/patch-revision-user-page-index.sql b/maintenance/archives/patch-revision-user-page-index.sql
deleted file mode 100644 (file)
index 9058e4e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
--- New index on revision table to allow searches for all edits by a given user
--- to a given page. Added 2007-08-28
-
-ALTER TABLE /*$wgDBprefix*/revision
-  ADD INDEX page_user_timestamp (rev_page,rev_user,rev_timestamp);
index 440921c..72a779a 100644 (file)
@@ -270,9 +270,6 @@ CREATE TABLE /*$wgDBprefix*/revision (
   -- Not yet used; reserved for future changes to the deletion system.
   rev_deleted tinyint unsigned NOT NULL default '0',
   
-  -- Was this edit made by a bot (and marked as such)?
-  rev_bot tinyint unsigned NOT NULL default '0',
-  
   -- Length of this revision in bytes
   rev_len int unsigned,
 
@@ -285,8 +282,7 @@ CREATE TABLE /*$wgDBprefix*/revision (
   INDEX rev_timestamp (rev_timestamp),
   INDEX page_timestamp (rev_page,rev_timestamp),
   INDEX user_timestamp (rev_user,rev_timestamp),
-  INDEX usertext_timestamp (rev_user_text,rev_timestamp),
-  INDEX page_user_timestamp (rev_page,rev_user,rev_timestamp)
+  INDEX usertext_timestamp (rev_user_text,rev_timestamp)
 
 ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
 -- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit
index 4438c9a..beadacf 100644 (file)
@@ -83,7 +83,6 @@ $wgNewFields = array(
        array( 'oldimage',      'oi_metadata',      'patch-oi_metadata.sql'),
        array( 'archive',       'ar_page_id',       'patch-archive-page_id.sql'),
        array( 'image',         'img_sha1',         'patch-img_sha1.sql' ),
-       array( 'revision',              'rev_bot',                      'patch-rev_bot.sql' ),
 );
 
 # For extensions only, should be populated via hooks
@@ -1032,8 +1031,6 @@ function do_all_updates( $shared = false, $purge = true ) {
        
        do_oldimage_user_index(); flush ();
 
-       do_revision_page_user_index(); flush ();
-
        echo "Deleting old default messages (this may take a long time!)..."; flush();
        deleteDefaultMessages();
        echo "Done\n"; flush();
@@ -1132,17 +1129,6 @@ function do_restrictions_update() {
        
 }
 
-function do_revision_page_user_index() {
-       global $wgDatabase;
-       if( $wgDatabase->indexExists( 'revision', 'page_user_timestamp' ) ) {
-               echo "...page,user,timestamp key on revision already exists.\n";
-       } else {
-               echo "Adding page,user,timestamp key on revision table... ";
-               dbsource( archive("patch-revision-user-page-index.sql"), $wgDatabase );
-               echo "ok\n";
-       }
-}
-
 function
 pg_describe_table($table)
 {