1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/src/applications/differential
epriestley 305fb3fbd9 Migrate all Differential comment text into new storage
Summary:
Ref T2222. Currently, `DifferentialComment` stores both (a) the text of comments and (b) various other transaction details. This data needs to map to both Transactions and TransactionComments in the long run. This diff separates out all the data which is bound for the TransactionComment table, so that when we migrate `DifferentialComment` itself it will //only// need to migrate into the Transactions table. This is a much simpler migration than the inline comment one was, partly because it set up infrastructure and partly because the data is less complex.

Basically, I'm just proxying the read/write for the comment text into the other table. All readers already go through the Query class, and there are only three writers (preview, comment, implicit comment on diff update) which are all highly regular and straightforward to test.

We can also back out of this diff very easily: doing double writes cost only one line of code (`$this->content = $content;`) so we have proper double writes and a trivial revert path.

Test Plan:
  - Without migrating, added comments and saw them show up.
  - Migrated.
  - Saw all the old comments, and no damage to the new ones.
  - Added new comments.
  - Used comment preview.
  - Updated a revision to implicitly create an update comment and verified it looked OK.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8196
2014-02-11 11:34:15 -08:00
..
__tests__ Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
application Land Revision button for hosted git repos 2013-11-05 13:00:13 -08:00
capability Allow "Default View" policies to be set to Public 2013-10-09 15:06:18 -07:00
conduit Wrong method name. 2014-01-26 15:30:38 -08:00
config Add a config flag to treat "Accepted" revisions as "Closed" 2013-11-25 17:40:01 -08:00
constants Translate Differential Feed/Comment/Asana stories 2014-02-09 10:07:29 -08:00
controller Add Disabled mode to landing revision ui 2014-01-30 09:07:50 -08:00
doorkeeper Normalize the definition of "closed" revision statuses 2013-11-25 17:39:24 -08:00
editor Herald - Add "new" field to herald 2014-02-04 10:43:31 -10:00
event Make event-triggered actions more aware of application access 2013-10-21 17:00:50 -07:00
exception Delete license headers from files 2012-11-05 11:16:51 -08:00
field Remove policy caveat from Differential 2014-01-29 11:44:10 -08:00
garbagecollector Complete modularization of the GC daemon 2014-01-15 10:02:31 -08:00
landing Add Disabled mode to landing revision ui 2014-01-30 09:07:50 -08:00
lipsum Add a "default view" policy to Differential 2013-10-09 13:58:00 -07:00
mail Fix two edge case issues with Differential mail tags 2014-01-09 10:56:27 -08:00
parser Make most file reads policy-aware 2013-09-30 09:38:13 -07:00
phid Remove many redundant implementations of canLoadNamedObject() 2013-12-18 12:00:01 -08:00
query Migrate all Differential comment text into new storage 2014-02-11 11:34:15 -08:00
remarkup Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
render Replace some hsprintf() by phutil_tag() 2013-11-11 09:23:23 -08:00
search Index "Closed" and "Unowned" relationships explicitly 2014-02-03 12:51:18 -08:00
storage Migrate all Differential comment text into new storage 2014-02-11 11:34:15 -08:00
view Translate Differential Feed/Comment/Asana stories 2014-02-09 10:07:29 -08:00
DifferentialGetWorkingCopy.php Semi-fix git cloning for non-bare repos for landing 2013-12-30 15:22:32 -08:00
DifferentialTasksAttacher.php Delete license headers from files 2012-11-05 11:16:51 -08:00