mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Rename HarbormasterBuildMessage "buildTargetPHID" to "receiverPHID"
Summary: Ref T13054. Companion storage change for D19062. Test Plan: Applied migration and adjustments. Viewed messages in Harbormaster; created them with `harbormaster.sendmessage`; processed them with `bin/phd debug task`. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13054 Differential Revision: https://secure.phabricator.com/D19063
This commit is contained in:
parent
ed0ba41cd2
commit
c42bbd6f5c
3 changed files with 6 additions and 16 deletions
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_buildmessage
|
||||
CHANGE buildTargetPHID receiverPHID VARBINARY(64) NOT NULL;
|
|
@ -71,7 +71,7 @@ final class HarbormasterBuildMessageQuery
|
|||
if ($this->receiverPHIDs !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
'buildTargetPHID IN (%Ls)',
|
||||
'receiverPHID IN (%Ls)',
|
||||
$this->receiverPHIDs);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ final class HarbormasterBuildMessage extends HarbormasterDAO
|
|||
implements PhabricatorPolicyInterface {
|
||||
|
||||
protected $authorPHID;
|
||||
protected $buildTargetPHID;
|
||||
protected $receiverPHID;
|
||||
protected $type;
|
||||
protected $isConsumed;
|
||||
|
||||
|
@ -34,29 +34,17 @@ final class HarbormasterBuildMessage extends HarbormasterDAO
|
|||
'isConsumed' => 'bool',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_buildtarget' => array(
|
||||
'columns' => array('buildTargetPHID'),
|
||||
'key_receiver' => array(
|
||||
'columns' => array('receiverPHID'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
public function getReceiverPHID() {
|
||||
return $this->getBuildTargetPHID();
|
||||
}
|
||||
|
||||
public function setReceiverPHID($phid) {
|
||||
return $this->setBuildTargetPHID($phid);
|
||||
}
|
||||
|
||||
public function getReceiver() {
|
||||
return $this->assertAttached($this->receiver);
|
||||
}
|
||||
|
||||
public function getBuildTarget() {
|
||||
return $this->getReceiver();
|
||||
}
|
||||
|
||||
public function attachReceiver($receiver) {
|
||||
$this->receiver = $receiver;
|
||||
return $this;
|
||||
|
|
Loading…
Reference in a new issue