+ $revQuery = Revision::getQueryInfo();
+
+ // For MIGRATION_NEW, target indexes on the revision_actor_temp table.
+ // Otherwise, revision is fine because it'll have to check all revision rows anyway.
+ $pageField = $wgActorTableSchemaMigrationStage === MIGRATION_NEW ? 'revactor_page' : 'rev_page';
+ $idField = $wgActorTableSchemaMigrationStage === MIGRATION_NEW
+ ? 'revactor_actor' : $revQuery['fields']['rev_user'];
+ $countField = $wgActorTableSchemaMigrationStage === MIGRATION_NEW
+ ? 'revactor_actor' : $revQuery['fields']['rev_user_text'];