Merge "RCFilters UI: Display popups above CapsuleItemWidgets"
[lhc/web/wiklou.git] / includes / installer / MysqlUpdater.php
index d95222c..3131c3c 100644 (file)
@@ -20,6 +20,9 @@
  * @file
  * @ingroup Deployment
  */
+use Wikimedia\Rdbms\Field;
+use Wikimedia\Rdbms\MySQLField;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Mysql update list and mysql-specific update functions.
@@ -294,6 +297,8 @@ class MysqlUpdater extends DatabaseUpdater {
 
                        // 1.29
                        [ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ],
+                       [ 'dropIndex', 'user_groups', 'ug_user_group', 'patch-user_groups-primary-key.sql' ],
+                       [ 'addField', 'user_groups', 'ug_expiry', 'patch-user_groups-ug_expiry.sql' ],
                ];
        }
 
@@ -819,7 +824,7 @@ class MysqlUpdater extends DatabaseUpdater {
        /**
         * Set page_random field to a random value where it is equals to 0.
         *
-        * @see bug 3946
+        * @see T5946
         */
        protected function doPageRandomUpdate() {
                $page = $this->db->tableName( 'page' );
@@ -851,7 +856,8 @@ class MysqlUpdater extends DatabaseUpdater {
                        foreach ( $res as $row ) {
                                $count = ( $count + 1 ) % 100;
                                if ( $count == 0 ) {
-                                       wfGetLBFactory()->waitForReplication( [ 'wiki' => wfWikiID() ] );
+                                       $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                                       $lbFactory->waitForReplication( [ 'wiki' => wfWikiID() ] );
                                }
                                $this->db->insert( 'templatelinks',
                                        [