Committed a bunch of live hacks from Wikimedia servers
[lhc/web/wiklou.git] / maintenance / updaters.inc
index 949451d..9acf302 100644 (file)
@@ -22,7 +22,6 @@ $wgNewTables = array(
        array( 'objectcache',   'patch-objectcache.sql' ),
        array( 'categorylinks', 'patch-categorylinks.sql' ),
        array( 'logging',       'patch-logging.sql' ),
-       array( 'validate',      'patch-validate.sql' ),
        array( 'user_newtalk',  'patch-usernewtalk2.sql' ),
        array( 'transcache',    'patch-transcache.sql' ),
        array( 'trackbacks',    'patch-trackbacks.sql' ),
@@ -53,11 +52,11 @@ $wgNewFields = array(
        array( 'image',         'img_width',        'patch-img_width.sql' ),
        array( 'image',         'img_metadata',     'patch-img_metadata.sql' ),
        array( 'image',         'img_media_type',   'patch-img_media_type.sql' ),
-       array( 'validate',      'val_ip',           'patch-val_ip.sql' ),
        array( 'site_stats',    'ss_total_pages',   'patch-ss_total_articles.sql' ),
        array( 'interwiki',     'iw_trans',         'patch-interwiki-trans.sql' ),
        array( 'ipblocks',      'ipb_range_start',  'patch-ipb_range_start.sql' ),
        array( 'site_stats',    'ss_images',        'patch-ss_images.sql' ),
+       array( 'ipblocks',      'ipb_anon_only',    'patch-ipb_anon_only.sql' ),
 );
 
 function rename_table( $from, $to, $patch ) {
@@ -763,6 +762,23 @@ function do_templatelinks_update() {
        echo "Done. Please run maintenance/refreshLinks.php for a more thorough templatelinks update.\n";
 }
 
+# July 2006
+# Add ( rc_namespace, rc_user_text ) index [R. Church]
+function do_rc_indices_update() {
+       global $wgDatabase;
+       echo( "Checking for additional recent changes indices...\n" );
+       # See if we can find the index we want
+       $info = $wgDatabase->indexInfo( 'recentchanges', 'rc_ns_usertext', __METHOD__ );
+       if( !$info ) {
+               # None, so create
+               echo( "...index on ( rc_namespace, rc_user_text ) not found; creating\n" );
+               dbsource( archive( 'patch-recentchanges-utindex.sql' ) );
+       } else {
+               # Index seems to exist
+               echo( "...seems to be ok\n" );
+       }
+}
+
 function do_all_updates( $doShared = false ) {
        global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgDatabase;
 
@@ -821,6 +837,8 @@ function do_all_updates( $doShared = false ) {
        do_logging_timestamp_index(); flush();
 
        do_page_random_update(); flush();
+       
+       do_rc_indices_update(); flush();
 
        initialiseMessages(); flush();
 }