Remove "behindTransactionPHID" from ConpherenceParticipant
Summary: Pathway to D17685. Nothing reads this field and it has no use or value. Test Plan: - Ran migration. - Grepped for `behindTransactionPHID`. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D17729
This commit is contained in:
2
resources/sql/autopatches/20170419.thread.01.behind.sql
Normal file
2
resources/sql/autopatches/20170419.thread.01.behind.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE {$NAMESPACE}_conpherence.conpherence_participant
|
||||||
|
DROP behindTransactionPHID;
|
||||||
@@ -168,8 +168,7 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
// participation data asap to pass policy checks. For existing
|
// participation data asap to pass policy checks. For existing
|
||||||
// ConpherenceThreads, the existing participation is correct
|
// ConpherenceThreads, the existing participation is correct
|
||||||
// at this stage. Note that later in applyCustomExternalTransaction
|
// at this stage. Note that later in applyCustomExternalTransaction
|
||||||
// this participation data will be updated, particularly the
|
// this participation data will be updated.
|
||||||
// behindTransactionPHID which is just a generated dummy for now.
|
|
||||||
$participants = array();
|
$participants = array();
|
||||||
$phids = $this->getPHIDTransactionNewValue($xaction, array());
|
$phids = $this->getPHIDTransactionNewValue($xaction, array());
|
||||||
foreach ($phids as $phid) {
|
foreach ($phids as $phid) {
|
||||||
@@ -186,7 +185,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
->setParticipantPHID($phid)
|
->setParticipantPHID($phid)
|
||||||
->setParticipationStatus($status)
|
->setParticipationStatus($status)
|
||||||
->setDateTouched(time())
|
->setDateTouched(time())
|
||||||
->setBehindTransactionPHID($xaction->generatePHID())
|
|
||||||
->setSeenMessageCount($message_count)
|
->setSeenMessageCount($message_count)
|
||||||
->save();
|
->save();
|
||||||
$object->attachParticipants($participants);
|
$object->attachParticipants($participants);
|
||||||
@@ -257,7 +255,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
->setParticipantPHID($phid)
|
->setParticipantPHID($phid)
|
||||||
->setParticipationStatus($status)
|
->setParticipationStatus($status)
|
||||||
->setDateTouched(time())
|
->setDateTouched(time())
|
||||||
->setBehindTransactionPHID($xaction->getPHID())
|
|
||||||
->setSeenMessageCount($message_count)
|
->setSeenMessageCount($message_count)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
@@ -290,7 +287,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
foreach ($participants as $phid => $participant) {
|
foreach ($participants as $phid => $participant) {
|
||||||
if ($phid != $user->getPHID()) {
|
if ($phid != $user->getPHID()) {
|
||||||
if ($participant->getParticipationStatus() != $behind) {
|
if ($participant->getParticipationStatus() != $behind) {
|
||||||
$participant->setBehindTransactionPHID($xaction_phid);
|
|
||||||
$participant->setSeenMessageCount(
|
$participant->setSeenMessageCount(
|
||||||
$object->getMessageCount() - $message_count);
|
$object->getMessageCount() - $message_count);
|
||||||
}
|
}
|
||||||
@@ -298,7 +294,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||||||
$participant->setDateTouched($time);
|
$participant->setDateTouched($time);
|
||||||
} else {
|
} else {
|
||||||
$participant->setSeenMessageCount($object->getMessageCount());
|
$participant->setSeenMessageCount($object->getMessageCount());
|
||||||
$participant->setBehindTransactionPHID($xaction_phid);
|
|
||||||
$participant->setParticipationStatus($up_to_date);
|
$participant->setParticipationStatus($up_to_date);
|
||||||
$participant->setDateTouched($time);
|
$participant->setDateTouched($time);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ final class ConpherenceParticipant extends ConpherenceDAO {
|
|||||||
protected $participantPHID;
|
protected $participantPHID;
|
||||||
protected $conpherencePHID;
|
protected $conpherencePHID;
|
||||||
protected $participationStatus;
|
protected $participationStatus;
|
||||||
protected $behindTransactionPHID;
|
|
||||||
protected $seenMessageCount;
|
protected $seenMessageCount;
|
||||||
protected $dateTouched;
|
protected $dateTouched;
|
||||||
protected $settings = array();
|
protected $settings = array();
|
||||||
@@ -44,7 +43,6 @@ final class ConpherenceParticipant extends ConpherenceDAO {
|
|||||||
ConpherenceTransaction $xaction) {
|
ConpherenceTransaction $xaction) {
|
||||||
if (!$this->isUpToDate($conpherence)) {
|
if (!$this->isUpToDate($conpherence)) {
|
||||||
$this->setParticipationStatus(ConpherenceParticipationStatus::UP_TO_DATE);
|
$this->setParticipationStatus(ConpherenceParticipationStatus::UP_TO_DATE);
|
||||||
$this->setBehindTransactionPHID($xaction->getPHID());
|
|
||||||
$this->setSeenMessageCount($conpherence->getMessageCount());
|
$this->setSeenMessageCount($conpherence->getMessageCount());
|
||||||
$this->save();
|
$this->save();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user