X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FMysqlUpdater.php;h=a9ca28614dba819b3ebcaf73650c39e1bc6a2277;hb=81cbe34e4d519c62ac441197fe070709e4324304;hp=f8114e3e75780263860ec94181f8d0c472119c4a;hpb=55aab97bb4b507911e24995ae870b78f86c17557;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index f8114e3e75..a9ca28614d 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -84,7 +84,6 @@ class MysqlUpdater extends DatabaseUpdater { [ 'doUserGroupsUpdate' ], [ 'addField', 'site_stats', 'ss_total_pages', 'patch-ss_total_articles.sql' ], [ 'addTable', 'user_newtalk', 'patch-usernewtalk.sql' ], - [ 'addTable', 'transcache', 'patch-transcache.sql' ], [ 'addField', 'interwiki', 'iw_trans', 'patch-interwiki-trans.sql' ], // 1.6 @@ -170,9 +169,8 @@ class MysqlUpdater extends DatabaseUpdater { [ 'doLogUsertextPopulation' ], [ 'doLogSearchPopulation' ], [ 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ], - [ 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ], + [ 'addIndex', 'tag_summary', 'tag_summary_rc_id', 'patch-change_tag-indexes.sql' ], [ 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ], - [ 'doUpdateTranscacheField' ], [ 'doUpdateMimeMinorField' ], // 1.17 @@ -197,7 +195,6 @@ class MysqlUpdater extends DatabaseUpdater { [ 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ], // 1.19 - [ 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql' ], [ 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ], [ 'doMigrateUserOptions' ], [ 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ], @@ -320,7 +317,6 @@ class MysqlUpdater extends DatabaseUpdater { [ 'renameIndex', 'querycache_info', 'qci_type', 'PRIMARY', false, 'patch-querycache_info-fix-pk.sql' ], [ 'renameIndex', 'site_stats', 'ss_row_id', 'PRIMARY', false, 'patch-site_stats-fix-pk.sql' ], - [ 'renameIndex', 'transcache', 'tc_url_idx', 'PRIMARY', false, 'patch-transcache-fix-pk.sql' ], [ 'renameIndex', 'user_former_groups', 'ufg_user_group', 'PRIMARY', false, 'patch-user_former_groups-fix-pk.sql' ], [ 'renameIndex', 'user_properties', 'user_properties_user_property', 'PRIMARY', false, @@ -358,6 +354,24 @@ class MysqlUpdater extends DatabaseUpdater { [ 'runMaintenance', DeduplicateArchiveRevId::class, 'maintenance/deduplicateArchiveRevId.php' ], [ 'addField', 'change_tag', 'ct_tag_id', 'patch-change_tag-tag_id.sql' ], [ 'addIndex', 'archive', 'ar_revid_uniq', 'patch-archive-ar_rev_id-unique.sql' ], + [ 'populateContentTables' ], + [ 'addIndex', 'logging', 'log_type_action', 'patch-logging-log-type-action-index.sql' ], + [ 'dropIndex', 'logging', 'type_action', 'patch-logging-drop-type-action-index.sql' ], + [ 'renameIndex', 'interwiki', 'iw_prefix', 'PRIMARY', false, 'patch-interwiki-fix-pk.sql' ], + [ 'renameIndex', 'page_props', 'pp_page_propname', 'PRIMARY', false, + 'patch-page_props-fix-pk.sql' ], + [ 'renameIndex', 'protected_titles', 'pt_namespace_title', 'PRIMARY', false, + 'patch-protected_titles-fix-pk.sql' ], + [ 'renameIndex', 'site_identifiers', 'site_ids_type', 'PRIMARY', false, + 'patch-site_identifiers-fix-pk.sql' ], + [ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ], + [ 'dropTable', 'transcache' ], + [ 'runMaintenance', PopulateChangeTagDef::class, 'maintenance/populateChangeTagDef.php' ], + [ 'addIndex', 'change_tag', 'change_tag_rc_tag_id', + 'patch-change_tag-change_tag_rc_tag_id.sql' ], + [ 'addField', 'ipblocks', 'ipb_sitewide', 'patch-ipb_sitewide.sql' ], + [ 'addTable', 'ipblocks_restrictions', 'patch-ipblocks_restrictions-table.sql' ], + [ 'migrateImageCommentTemp' ], ]; } @@ -588,7 +602,7 @@ class MysqlUpdater extends DatabaseUpdater { foreach ( $rows as $row ) { if ( $prev_title == $row->cur_title && $prev_namespace == $row->cur_namespace ) { - $deleteId[] = $row->cur_id; + $deleteId[] = (int)$row->cur_id; } $prev_title = $row->cur_title; $prev_namespace = $row->cur_namespace; @@ -747,8 +761,9 @@ class MysqlUpdater extends DatabaseUpdater { 'Converting links and brokenlinks tables to pagelinks' ); - global $wgContLang; - foreach ( $wgContLang->getNamespaces() as $ns => $name ) { + foreach ( + MediaWikiServices::getInstance()->getContentLanguage()->getNamespaces() as $ns => $name + ) { if ( $ns == 0 ) { continue; } @@ -915,7 +930,8 @@ class MysqlUpdater extends DatabaseUpdater { $count = ( $count + 1 ) % 100; if ( $count == 0 ) { $lbFactory = $services->getDBLoadBalancerFactory(); - $lbFactory->waitForReplication( [ 'wiki' => wfWikiID() ] ); + $lbFactory->waitForReplication( [ + 'wiki' => wfWikiID(), 'timeout' => self::REPLICATION_WAIT_TIMEOUT ] ); } $this->db->insert( 'templatelinks', [ @@ -1222,7 +1238,7 @@ class MysqlUpdater extends DatabaseUpdater { 'Extending edit summary lengths (and setting defaults)' ); } else { - $this->output( '...comment fields are up to date' ); + $this->output( "...comment fields are up to date.\n" ); } }