Merge "Set default fragment mode to [ 'legacy', 'html5' ]"
[lhc/web/wiklou.git] / includes / installer / MysqlUpdater.php
index 466ad0f..44086a1 100644 (file)
@@ -329,6 +329,13 @@ class MysqlUpdater extends DatabaseUpdater {
                        [ 'renameIndex', 'l10n_cache', 'lc_lang_key', 'PRIMARY', false,
                                'patch-l10n_cache-primary-key.sql' ],
                        [ 'doUnsignedSyncronisation' ],
+
+                       // 1.31
+                       [ 'addTable', 'slots', 'patch-slots.sql' ],
+                       [ 'addTable', 'content', 'patch-content.sql' ],
+                       [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ],
+                       [ 'addTable', 'content_models', 'patch-content_models.sql' ],
+                       [ 'migrateArchiveText' ],
                ];
        }
 
@@ -865,7 +872,8 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->applyPatch( 'patch-templatelinks.sql', false, "Creating templatelinks table" );
 
                $this->output( "Populating...\n" );
-               if ( wfGetLB()->getServerCount() > 1 ) {
+               $services = MediaWikiServices::getInstance();
+               if ( $services->getDBLoadBalancer()->getServerCount() > 1 ) {
                        // Slow, replication-friendly update
                        $res = $this->db->select( 'pagelinks', [ 'pl_from', 'pl_namespace', 'pl_title' ],
                                [ 'pl_namespace' => NS_TEMPLATE ], __METHOD__ );
@@ -873,7 +881,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        foreach ( $res as $row ) {
                                $count = ( $count + 1 ) % 100;
                                if ( $count == 0 ) {
-                                       $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                                       $lbFactory = $services->getDBLoadBalancerFactory();
                                        $lbFactory->waitForReplication( [ 'wiki' => wfWikiID() ] );
                                }
                                $this->db->insert( 'templatelinks',