MediaWiki  master
ActorMigration.php
Go to the documentation of this file.
1 <?php
2 
5 
21 
26  public const FIELD_INFOS = [
27  'rev_user' => [
28  'tempTable' => [
29  'table' => 'revision_actor_temp',
30  'pk' => 'revactor_rev',
31  'field' => 'revactor_actor',
32  'joinPK' => 'rev_id',
33  'extra' => [
34  'revactor_timestamp' => 'rev_timestamp',
35  'revactor_page' => 'rev_page',
36  ],
37  ]
38  ],
39 
40  // Deprecated since 1.34
41  'ar_user' => [
42  'deprecatedVersion' => '1.37',
43  ],
44  // Deprecated since 1.34
45  'img_user' => [
46  'deprecatedVersion' => '1.37',
47  ],
48  // Deprecated since 1.34
49  'oi_user' => [
50  'deprecatedVersion' => '1.37',
51  ],
52  // Deprecated since 1.34
53  'fa_user' => [
54  'deprecatedVersion' => '1.37',
55  ],
56  // Deprecated since 1.34
57  'rc_user' => [
58  'deprecatedVersion' => '1.37',
59  ],
60  // Deprecated since 1.34
61  'log_user' => [
62  'deprecatedVersion' => '1.37',
63  ],
64  // Deprecated since 1.34
65  'ipb_by' => [
66  'deprecatedVersion' => '1.37',
67  'textField' => 'ipb_by_text',
68  'actorField' => 'ipb_by_actor'
69  ]
70  ];
71 
76  public static function newMigration() {
77  return MediaWikiServices::getInstance()->getActorMigration();
78  }
79 
86  public function __construct(
87  $stage,
89  ) {
90  if ( $stage & SCHEMA_COMPAT_OLD ) {
91  throw new InvalidArgumentException(
92  'The old actor table schema is no longer supported' );
93  }
94  parent::__construct(
95  self::FIELD_INFOS,
96  $stage,
98  );
99  }
100 }
ActorMigration\MIGRATION_STAGE_SCHEMA_COMPAT
const MIGRATION_STAGE_SCHEMA_COMPAT
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1....
Definition: ActorMigration.php:20
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:193
ActorMigration
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once acto...
Definition: ActorMigration.php:15
MediaWiki\User\ActorStoreFactory
Definition: ActorStoreFactory.php:35
ActorMigration\newMigration
static newMigration()
Static constructor.
Definition: ActorMigration.php:76
ActorMigration\FIELD_INFOS
const FIELD_INFOS
Field information.
Definition: ActorMigration.php:26
ActorMigration\__construct
__construct( $stage, ActorStoreFactory $actorStoreFactory)
Definition: ActorMigration.php:86
ActorMigrationBase\$actorStoreFactory
ActorStoreFactory $actorStoreFactory
Definition: ActorMigrationBase.php:46
ActorMigrationBase
This abstract base class helps migrate core and extension code to use the actor table.
Definition: ActorMigrationBase.php:35
SCHEMA_COMPAT_OLD
const SCHEMA_COMPAT_OLD
Definition: Defines.php:274