From 81d8f988c76fd2669486a83842bb0dfb594178cb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 7 Sep 2007 13:30:28 +0000 Subject: [PATCH] Revert 25602 and 25604 schema changes for now. 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 | 4 ++-- maintenance/archives/patch-rev_bot.sql | 5 ----- .../archives/patch-revision-user-page-index.sql | 5 ----- maintenance/tables.sql | 6 +----- maintenance/updaters.inc | 14 -------------- 5 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 maintenance/archives/patch-rev_bot.sql delete mode 100644 maintenance/archives/patch-revision-user-page-index.sql diff --git a/includes/Article.php b/includes/Article.php index 0e51faf78b..7ba55c548b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 index 12bb5dbc78..0000000000 --- a/maintenance/archives/patch-rev_bot.sql +++ /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 index 9058e4e9fc..0000000000 --- a/maintenance/archives/patch-revision-user-page-index.sql +++ /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); diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 440921ceb9..72a779a912 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -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 diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 4438c9ad04..beadacfa52 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -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) { -- 2.20.1