Mostly drop old pre-actor user schemas
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 23 Jul 2019 17:40:52 +0000 (13:40 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 9 Sep 2019 15:38:36 +0000 (11:38 -0400)
commitc29909e59fd89d9fc65a299687ad2aa2df995acc
treeb15cdd19fcf0d02647fb648f57953ae36a897c0f
parent54c93f1d384cd5accd2db2ebbb911e4d627c2980
Mostly drop old pre-actor user schemas

This removes most of the pre-actor user and user_text columns, and the
$wgActorTableSchemaMigrationStage setting that used to determine
whether the columns were used.

rev_user and rev_user_text remain in the code, as on Wikimedia wikis the
revision table is too large to alter at this time. A future change will
combine that with the removal of rev_comment, rev_content_model, and
rev_content_format (and the addition of rev_comment_id and rev_actor).

ActorMigration's constructor continues to take a $stage parameter, and
continues to have the logic for handling it, for the benefit of
extensions that might need their own migration process. Code using
ActorMigration for accessing the core fields should be updated to use
the new actor fields directly. That will be done for in a followup.

Bug: T188327
Change-Id: Id35544b879af1cd708f3efd303fce8d9a1b9eb02
57 files changed:
RELEASE-NOTES-1.34
includes/ActorMigration.php
includes/DefaultSettings.php
includes/Revision.php
includes/ServiceWiring.php
includes/actions/InfoAction.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryContributors.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUserContribs.php
includes/api/ApiQueryUserInfo.php
includes/block/DatabaseBlock.php
includes/cache/UserCache.php
includes/changes/RecentChange.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/LocalFileDeleteBatch.php
includes/filerepo/file/OldLocalFile.php
includes/installer/DatabaseUpdater.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteUpdater.php
includes/logging/ManualLogEntry.php
includes/page/WikiPage.php
includes/revisiondelete/RevDelList.php
includes/revisiondelete/RevisionDeleteUser.php
includes/specials/SpecialLog.php
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/NewFilesPager.php
includes/user/User.php
maintenance/archives/patch-drop-user-fields.sql [new file with mode: 0644]
maintenance/includes/MigrateActors.php
maintenance/postgres/tables.sql
maintenance/reassignEdits.php
maintenance/removeUnusedAccounts.php
maintenance/sqlite/archives/patch-archive-drop-ar_user.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-filearchive-drop-fa_user.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-image-drop-img_user.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-ipblocks-drop-ipb_by.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-logging-drop-log_user.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-oldimage-drop-oi_user.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-recentchanges-drop-rc_user.sql [new file with mode: 0644]
maintenance/tables.sql
tests/parser/ParserTestRunner.php
tests/phpunit/includes/ActorMigrationTest.php
tests/phpunit/includes/ActorMigrationTest.sql [new file with mode: 0644]
tests/phpunit/includes/Revision/RevisionQueryInfoTest.php
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
tests/phpunit/includes/logging/DatabaseLogEntryTest.php
tests/phpunit/includes/page/PageArchiveTestBase.php
tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/maintenance/deleteAutoPatrolLogsTest.php