Record a "series parent PHID" on Calendar events that retains relationships after forks

Summary:
When you edit "X and all future events", X becomes the new parent of an event series.

Currently, it loses its relationship to its original parent. Instead, retain that relationship -- it's separate from the normal "parent", but we can use it to make the UI more clear or tweak behaviors later.

This mostly just keeps us from losing/destroying data that we might need/want later.

Test Plan:
  - Ran migrations.
  - Cancelled "X and all future events", saw sensible-appearing beahvior in the database for "seriesParentPHID".

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16780
This commit is contained in:
epriestley
2016-10-31 13:47:45 -07:00
parent f44a9a4e48
commit b084efb362
3 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
ADD seriesParentPHID VARBINARY(64);
UPDATE {$NAMESPACE}_calendar.calendar_event
SET seriesParentPHID = instanceOfEventPHID;