r61893 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61892‎ | r61893 | r61894 >
Date:22:52, 2 February 2010
Author:juliano
Status:deferred
Tags:
Comment:
Add timestamp indexes to comments table.
Will be used later to list comments by date instead of grouped in threads.
It will also be used to create comment feeds.
Modified paths:
  • /trunk/extensions/Wikilog/WikilogHooks.php (modified) (history)
  • /trunk/extensions/Wikilog/archives (added) (history)
  • /trunk/extensions/Wikilog/archives/patch-comments-indexes.sql (added) (history)
  • /trunk/extensions/Wikilog/wikilog-tables.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikilog/archives/patch-comments-indexes.sql
@@ -0,0 +1,9 @@
 2+-- MediaWiki Wikilog extension database patch.
 3+--
 4+-- Version: 1.0.99.1dev
 5+-- Add wlc_timestamp and wlc_updated indexes to wikilog_comments table.
 6+--
 7+
 8+ALTER TABLE /*$wgDBprefix*/wikilog_comments
 9+ ADD INDEX wlc_timestamp (wlc_timestamp),
 10+ ADD INDEX wlc_updated (wlc_updated);
Property changes on: trunk/extensions/Wikilog/archives/patch-comments-indexes.sql
___________________________________________________________________
Name: svn:eol-style
111 + native
Index: trunk/extensions/Wikilog/WikilogHooks.php
@@ -365,6 +365,7 @@
366366
367367 if ( $wgDBtype == 'mysql' ) {
368368 $wgExtNewTables[] = array( "wikilog_wikilogs", "{$dir}wikilog-tables.sql" );
 369+ $wgExtNewIndexes[] = array( "wikilog_comments", "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql" );
369370 } else {
370371 // TODO: PostgreSQL, SQLite, etc...
371372 print "\n" .
Index: trunk/extensions/Wikilog/wikilog-tables.sql
@@ -1,5 +1,4 @@
22 -- Tables used by the MediaWiki Wikilog extension.
33 --
44 -- You should not have to create these tables manually unless you are doing
55 -- a manual installation. In normal conditions, maintenance/update.php should
@@ -156,6 +155,8 @@
157156
158157 PRIMARY KEY (wlc_id),
159158 INDEX wlc_post_thread (wlc_post, wlc_thread),
 159+ INDEX wlc_timestamp (wlc_timestamp),
 160+ INDEX wlc_updated (wlc_updated),
160161 INDEX wlc_comment_page (wlc_comment_page)
161162
162163 ) /*$wgDBTableOptions*/;

Status & tagging log