Manual:MigrateActors.php

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎polski • ‎فارسی • ‎日本語 • ‎한국어

MediaWiki version: 1.31

Details

migrateActors.php is a maintenance script that migrates actors from pre-1.31 columns to the 'actor' table.

$wgActorTableSchemaMigrationStage needs to be set to MIGRATION_WRITE_NEW or MIGRATION_NEW for the script to do the migration.

The script migrates the following columns:

Table Primary Key User Field Name Field New column
revision rev_id rev_user rev_user_text revactor_actor
archive ar_id ar_user ar_user_text ar_actor
ipblocks ipb_id ipb_by ipb_by_text ipb_by_actor
image img_name img_user img_user_text img_actor
oldimage oi_name, oi_timestamp oi_user oi_user_text oi_actor
filearchive fa_id fa_user fa_user_text fa_actor
recentchanges rc_id rc_user rc_user_text rc_actor
logging log_id log_user log_user_text log_actor

The actors are finally stored in the column actor_name in the actor table.

To improve performance during the run-time of this script, for the table revision, a temporary table named revision_actor_temp is being used during the migration.

This table will be merged with the table revision again in the future.

Usage

php migrateActors.php

See also