http://www.mediawiki.org/wiki/Special:Code/MediaWiki/61893

Revision: 61893
Author:   juliano
Date:     2010-02-02 22:52:14 +0000 (Tue, 02 Feb 2010)

Log Message:
-----------
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
    trunk/extensions/Wikilog/wikilog-tables.sql

Added Paths:
-----------
    trunk/extensions/Wikilog/archives/
    trunk/extensions/Wikilog/archives/patch-comments-indexes.sql

Modified: trunk/extensions/Wikilog/WikilogHooks.php
===================================================================
--- trunk/extensions/Wikilog/WikilogHooks.php   2010-02-02 22:11:45 UTC (rev 
61892)
+++ trunk/extensions/Wikilog/WikilogHooks.php   2010-02-02 22:52:14 UTC (rev 
61893)
@@ -365,6 +365,7 @@
 
                if ( $wgDBtype == 'mysql' ) {
                        $wgExtNewTables[] = array( "wikilog_wikilogs", 
"{$dir}wikilog-tables.sql" );
+                       $wgExtNewIndexes[] = array( "wikilog_comments", 
"wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql" );
                } else {
                        // TODO: PostgreSQL, SQLite, etc...
                        print "\n" .

Added: trunk/extensions/Wikilog/archives/patch-comments-indexes.sql
===================================================================
--- trunk/extensions/Wikilog/archives/patch-comments-indexes.sql                
                (rev 0)
+++ trunk/extensions/Wikilog/archives/patch-comments-indexes.sql        
2010-02-02 22:52:14 UTC (rev 61893)
@@ -0,0 +1,9 @@
+-- MediaWiki Wikilog extension database patch.
+--
+-- Version: 1.0.99.1dev
+-- Add wlc_timestamp and wlc_updated indexes to wikilog_comments table.
+--
+
+ALTER TABLE /*$wgDBprefix*/wikilog_comments
+  ADD INDEX wlc_timestamp (wlc_timestamp),
+  ADD INDEX wlc_updated (wlc_updated);


Property changes on: 
trunk/extensions/Wikilog/archives/patch-comments-indexes.sql
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/extensions/Wikilog/wikilog-tables.sql
===================================================================
--- trunk/extensions/Wikilog/wikilog-tables.sql 2010-02-02 22:11:45 UTC (rev 
61892)
+++ trunk/extensions/Wikilog/wikilog-tables.sql 2010-02-02 22:52:14 UTC (rev 
61893)
@@ -1,5 +1,4 @@
 -- Tables used by the MediaWiki Wikilog extension.
--- Juliano F. Ravasi, 2008
 --
 -- You should not have to create these tables manually unless you are doing
 -- a manual installation. In normal conditions, maintenance/update.php should
@@ -156,6 +155,8 @@
 
   PRIMARY KEY (wlc_id),
   INDEX wlc_post_thread (wlc_post, wlc_thread),
+  INDEX wlc_timestamp (wlc_timestamp),
+  INDEX wlc_updated (wlc_updated),
   INDEX wlc_comment_page (wlc_comment_page)
 
 ) /*$wgDBTableOptions*/;



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to