+ if ( $wgActorTableSchemaMigrationStage === MIGRATION_NEW ) {
+ $tables = [ 'revision_actor_temp' ];
+ $field = 'revactor_actor';
+ $pageField = 'revactor_page';
+ $tsField = 'revactor_timestamp';
+ $joins = [];
+ } elseif ( $wgActorTableSchemaMigrationStage === MIGRATION_OLD ) {
+ $tables = [ 'revision' ];
+ $field = 'rev_user_text';
+ $pageField = 'rev_page';
+ $tsField = 'rev_timestamp';
+ $joins = [];
+ } else {
+ $tables = [ 'revision', 'revision_actor_temp', 'actor' ];
+ $field = 'COALESCE( actor_name, rev_user_text)';
+ $pageField = 'rev_page';
+ $tsField = 'rev_timestamp';
+ $joins = [
+ 'revision_actor_temp' => [ 'LEFT JOIN', 'revactor_rev = rev_id' ],
+ 'actor' => [ 'LEFT JOIN', 'revactor_actor = actor_id' ],
+ ];
+ }
+