r97850 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97849‎ | r97850 | r97851 >
Date:20:34, 22 September 2011
Author:asher
Status:ok
Tags:
Comment:
- fix for 1.18 liquid thread migration script + schema based on prod being inconsistent
Modified paths:
  • /branches/wmf/1.18wmf1/maintenance/ums_conversation.sql (modified) (history)
  • /branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/maintenance/ums_conversation.sql
@@ -3,7 +3,7 @@
44 ALTER TABLE /*_*/user_message_state ADD COLUMN ums_conversation int(8) unsigned NOT NULL DEFAULT 0;
55
66 CREATE INDEX /*i*/ums_user_conversation ON /*_*/user_message_state (ums_user,ums_conversation);
7 -DROP INDEX /*i*/ums_user ON /*_*/user_message_state;
 7+-- DROP INDEX /*i*/ums_user ON /*_*/user_message_state;
88
99 UPDATE /*_*/user_message_state, /*_*/thread
1010 SET /*_*/user_message_state.ums_conversation = if(/*_*/thread.thread_ancestor, /*_*/thread.thread_ancestor, /*_*/thread.thread_id)
Index: branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-2.php
@@ -1,6 +1,7 @@
22 <?php
33
44 require( dirname( __FILE__ ) . '/commandLine.inc' );
 5+require( dirname( __FILE__ ) . '/../../wmf-config/InitialiseSettings.php' );
56
67 doAllSchemaChanges();
78
@@ -55,21 +56,22 @@
5657 }
5758
5859 function upgradeWiki( $db ) {
 60+ global $wgConf;
5961 $wiki = $db->getDBname();
6062 $server = $db->getServer();
6163
6264 $upgradeLogRow = $db->selectRow( 'updatelog',
6365 'ul_key',
64 - array( 'ul_key' => '1.18wmf1-2' ),
 66+ array( 'ul_key' => '1.18wmf1-lt' ),
6567 __FUNCTION__ );
6668 if ( $upgradeLogRow ) {
6769 echo $db->getDBname() . ": already done\n";
6870 return;
69 - }
 71+ }
7072
71 - echo "$server $wiki 1.18wmf1-2";
 73+ echo "$server $wiki 1.18wmf1-lt";
7274
73 - if ( $wgConf->get( 'wmgUseLiquidThreads', $wiki ) ) {
 75+ if ( $wgConf->get( 'wmgUseLiquidThreads', $wiki ) && $wiki != "test2wiki") {
7476 echo " liquidthreads";
7577 sourceUpgradeFile( $db, dirname( __FILE__ ) .'/ums_conversation.sql' );
7678 } else {
@@ -77,9 +79,9 @@
7880 }
7981
8082 $db->insert( 'updatelog',
81 - array( 'ul_key' => '1.18wmf1-2' ),
 83+ array( 'ul_key' => '1.18wmf1-lt' ),
8284 __FUNCTION__ );
83 - echo " ok\n";
 85+ echo " ok\n";
8486
8587 }
8688

Status & tagging log