mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 04:42:40 +01:00
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:
parent
15e7624a17
commit
c96e17f5ea
3 changed files with 3 additions and 8 deletions
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
|
||||
// ConpherenceThreads, the existing participation is correct
|
||||
// at this stage. Note that later in applyCustomExternalTransaction
|
||||
// this participation data will be updated, particularly the
|
||||
// behindTransactionPHID which is just a generated dummy for now.
|
||||
// this participation data will be updated.
|
||||
$participants = array();
|
||||
$phids = $this->getPHIDTransactionNewValue($xaction, array());
|
||||
foreach ($phids as $phid) {
|
||||
|
@ -186,7 +185,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||
->setParticipantPHID($phid)
|
||||
->setParticipationStatus($status)
|
||||
->setDateTouched(time())
|
||||
->setBehindTransactionPHID($xaction->generatePHID())
|
||||
->setSeenMessageCount($message_count)
|
||||
->save();
|
||||
$object->attachParticipants($participants);
|
||||
|
@ -257,7 +255,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||
->setParticipantPHID($phid)
|
||||
->setParticipationStatus($status)
|
||||
->setDateTouched(time())
|
||||
->setBehindTransactionPHID($xaction->getPHID())
|
||||
->setSeenMessageCount($message_count)
|
||||
->save();
|
||||
}
|
||||
|
@ -290,7 +287,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||
foreach ($participants as $phid => $participant) {
|
||||
if ($phid != $user->getPHID()) {
|
||||
if ($participant->getParticipationStatus() != $behind) {
|
||||
$participant->setBehindTransactionPHID($xaction_phid);
|
||||
$participant->setSeenMessageCount(
|
||||
$object->getMessageCount() - $message_count);
|
||||
}
|
||||
|
@ -298,7 +294,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||
$participant->setDateTouched($time);
|
||||
} else {
|
||||
$participant->setSeenMessageCount($object->getMessageCount());
|
||||
$participant->setBehindTransactionPHID($xaction_phid);
|
||||
$participant->setParticipationStatus($up_to_date);
|
||||
$participant->setDateTouched($time);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ final class ConpherenceParticipant extends ConpherenceDAO {
|
|||
protected $participantPHID;
|
||||
protected $conpherencePHID;
|
||||
protected $participationStatus;
|
||||
protected $behindTransactionPHID;
|
||||
protected $seenMessageCount;
|
||||
protected $dateTouched;
|
||||
protected $settings = array();
|
||||
|
@ -44,7 +43,6 @@ final class ConpherenceParticipant extends ConpherenceDAO {
|
|||
ConpherenceTransaction $xaction) {
|
||||
if (!$this->isUpToDate($conpherence)) {
|
||||
$this->setParticipationStatus(ConpherenceParticipationStatus::UP_TO_DATE);
|
||||
$this->setBehindTransactionPHID($xaction->getPHID());
|
||||
$this->setSeenMessageCount($conpherence->getMessageCount());
|
||||
$this->save();
|
||||
|
||||
|
|
Loading…
Reference in a new issue