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

Revision: 97850
Author:   asher
Date:     2011-09-22 20:34:55 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
- fix for 1.18 liquid thread migration script + schema based on prod being 
inconsistent 

Modified Paths:
--------------
    branches/wmf/1.18wmf1/maintenance/ums_conversation.sql
    branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php

Modified: branches/wmf/1.18wmf1/maintenance/ums_conversation.sql
===================================================================
--- branches/wmf/1.18wmf1/maintenance/ums_conversation.sql      2011-09-22 
20:31:23 UTC (rev 97849)
+++ branches/wmf/1.18wmf1/maintenance/ums_conversation.sql      2011-09-22 
20:34:55 UTC (rev 97850)
@@ -3,7 +3,7 @@
 ALTER TABLE /*_*/user_message_state ADD COLUMN ums_conversation int(8) 
unsigned NOT NULL DEFAULT 0;
 
 CREATE INDEX /*i*/ums_user_conversation ON /*_*/user_message_state 
(ums_user,ums_conversation);
-DROP INDEX /*i*/ums_user ON /*_*/user_message_state;
+-- DROP INDEX /*i*/ums_user ON /*_*/user_message_state;
 
 UPDATE /*_*/user_message_state, /*_*/thread
 SET /*_*/user_message_state.ums_conversation = if(/*_*/thread.thread_ancestor, 
/*_*/thread.thread_ancestor, /*_*/thread.thread_id)

Modified: branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php
===================================================================
--- branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php    2011-09-22 
20:31:23 UTC (rev 97849)
+++ branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php    2011-09-22 
20:34:55 UTC (rev 97850)
@@ -1,6 +1,7 @@
 <?php
 
 require( dirname( __FILE__ ) . '/commandLine.inc' );
+require( dirname( __FILE__ ) . '/../../wmf-config/InitialiseSettings.php' );
 
 doAllSchemaChanges();
 
@@ -55,21 +56,22 @@
 }
 
 function upgradeWiki( $db ) {
+       global $wgConf;
        $wiki = $db->getDBname();
        $server = $db->getServer();
 
        $upgradeLogRow = $db->selectRow( 'updatelog',
                'ul_key',
-               array( 'ul_key' => '1.18wmf1-2' ),
+               array( 'ul_key' => '1.18wmf1-lt' ),
                __FUNCTION__ );
        if ( $upgradeLogRow ) {
                echo $db->getDBname() . ": already done\n";
                return;
-       }
+    } 
 
-       echo "$server $wiki 1.18wmf1-2";
+       echo "$server $wiki 1.18wmf1-lt";
        
-       if ( $wgConf->get( 'wmgUseLiquidThreads', $wiki ) ) {
+       if ( $wgConf->get( 'wmgUseLiquidThreads', $wiki ) && $wiki != 
"test2wiki") {
                echo " liquidthreads";
                sourceUpgradeFile( $db, dirname( __FILE__ ) 
.'/ums_conversation.sql' );
        } else {
@@ -77,9 +79,9 @@
        }
        
        $db->insert( 'updatelog', 
-               array( 'ul_key' => '1.18wmf1-2' ),
+               array( 'ul_key' => '1.18wmf1-lt' ),
                __FUNCTION__ );
-       echo " ok\n";
+    echo " ok\n"; 
 
 }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to