MediaWiki REL1_37
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,
88 ActorStoreFactory $actorStoreFactory
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,
97 $actorStoreFactory
98 );
99 }
100}
const SCHEMA_COMPAT_OLD
Definition Defines.php:274
This abstract base class helps migrate core and extension code to use the actor table.
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once acto...
const MIGRATION_STAGE_SCHEMA_COMPAT
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1....
const FIELD_INFOS
Field information.
__construct( $stage, ActorStoreFactory $actorStoreFactory)
static newMigration()
Static constructor.
MediaWikiServices is the service locator for the application scope of MediaWiki.