Introduce a new schema migration stage in which rev_actor is used
directly and the revision_actor_temp table is no longer needed. This
becomes the new "new" stage whereas the previous situation is now
termed SCHEMA_COMPAT_TEMP.
Introduce migrateRevisionActorTemp which copies data from
revision_actor_temp to rev_actor. The code is similar to
migrateImageCommentTemp.php except that it doesn't delete from the old
table.
Partial revert of c29909e59f. That change removed direct
references to $wgActorTableSchemaMigrationStage and made queries
involving revision_actor_temp be unconditional. Such changes need to be
reverted to make the use of revision_actor_temp be conditional again.
In ActorMigrationTest, I compacted provideGetJoin() and
provideGetWhere(), removing most of the duplication between expected
values. I gave all the stages a short name, and mostly used the name in
providers.
Bug: T275246
Change-Id: I7498107dd6433ab7de5bf2e7b3fe2aa5e10e345d
27 lines
578 B
SQL
27 lines
578 B
SQL
-- These are carefully crafted to work in all five supported databases
|
|
|
|
CREATE TABLE /*_*/actormigration1 (
|
|
am1_id integer not null,
|
|
am1_user integer,
|
|
am1_user_text varchar(200),
|
|
am1_actor integer
|
|
);
|
|
|
|
CREATE TABLE /*_*/actormigration2 (
|
|
am2_id integer not null,
|
|
am2_user integer,
|
|
am2_user_text varchar(200),
|
|
am2_actor integer
|
|
);
|
|
|
|
CREATE TABLE /*_*/actormigration2_temp (
|
|
am2t_id integer not null,
|
|
am2t_actor integer
|
|
);
|
|
|
|
CREATE TABLE /*_*/actormigration3 (
|
|
am3_id integer not null,
|
|
am3_xxx integer,
|
|
am3_xxx_text varchar(200),
|
|
am3_xxx_actor integer
|
|
);
|