CommentStore: Accept SCHEMA_COMPAT_* constants
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 20 Sep 2019 18:35:39 +0000 (14:35 -0400)
committerMobrovac <mobrovac@wikimedia.org>
Thu, 26 Sep 2019 11:17:50 +0000 (11:17 +0000)
commitb8efacc22706abb4af6fec4429931417a8a21e45
treeb681e292188b47b1f76e49486937816ed69aaa77
parent11e3172c0382b5d69f63fa641be062b168f4047f
CommentStore: Accept SCHEMA_COMPAT_* constants

Extensions doing an actor and comment migration at the same time will
likely want to use the same constants for each, and that will most
likely be using write-both/read-old and write-both/read-new for the
middle stages rather than write-both/read-both and write-new/read-both
as implemented by the MIGRATION_* constants. See Ie29fd05 for example.

This patch changes CommentStore's internal logic to work correctly when
passed write-both/read-old or write-both/read-new.

Bug: T233449
Change-Id: Iebec80f969ad1c4f9f51a4f25656319cca32b0dd
includes/CommentStore.php
tests/phpunit/includes/CommentStoreTest.php