Merge "Reset Title cache when importing titles."
[lhc/web/wiklou.git] / includes / installer / MysqlUpdater.php
index 81f563a..36d2c1d 100644 (file)
@@ -270,6 +270,9 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'dropTable', 'hitcounter' ),
                        array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
                        array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
+                       array( 'doUserNewTalkUseridUnsigned' ),
+                       // note this patch covers other _comment and _description fields too
+                       array( 'modifyField', 'recentchanges', 'rc_comment', 'patch-editsummary-length.sql' ),
                );
        }
 
@@ -1062,4 +1065,26 @@ class MysqlUpdater extends DatabaseUpdater {
                        'Making iwl_prefix_title_from index non-UNIQUE'
                );
        }
+
+       protected function doUserNewTalkUseridUnsigned() {
+               if ( !$this->doTable( 'user_newtalk' ) ) {
+                       return true;
+               }
+
+               $info = $this->db->fieldInfo( 'user_newtalk', 'user_id' );
+               if ( $info === false ) {
+                       return true;
+               }
+               if ( $info->isUnsigned() ) {
+                       $this->output( "...user_id is already unsigned int.\n" );
+
+                       return true;
+               }
+
+               return $this->applyPatch(
+                       'patch-user-newtalk-userid-unsigned.sql',
+                       false,
+                       'Making user_id unsigned int'
+               );
+       }
 }