mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +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) {
|
if ($this->receiverPHIDs !== null) {
|
||||||
$where[] = qsprintf(
|
$where[] = qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'buildTargetPHID IN (%Ls)',
|
'receiverPHID IN (%Ls)',
|
||||||
$this->receiverPHIDs);
|
$this->receiverPHIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ final class HarbormasterBuildMessage extends HarbormasterDAO
|
||||||
implements PhabricatorPolicyInterface {
|
implements PhabricatorPolicyInterface {
|
||||||
|
|
||||||
protected $authorPHID;
|
protected $authorPHID;
|
||||||
protected $buildTargetPHID;
|
protected $receiverPHID;
|
||||||
protected $type;
|
protected $type;
|
||||||
protected $isConsumed;
|
protected $isConsumed;
|
||||||
|
|
||||||
|
@ -34,29 +34,17 @@ final class HarbormasterBuildMessage extends HarbormasterDAO
|
||||||
'isConsumed' => 'bool',
|
'isConsumed' => 'bool',
|
||||||
),
|
),
|
||||||
self::CONFIG_KEY_SCHEMA => array(
|
self::CONFIG_KEY_SCHEMA => array(
|
||||||
'key_buildtarget' => array(
|
'key_receiver' => array(
|
||||||
'columns' => array('buildTargetPHID'),
|
'columns' => array('receiverPHID'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getReceiverPHID() {
|
|
||||||
return $this->getBuildTargetPHID();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setReceiverPHID($phid) {
|
|
||||||
return $this->setBuildTargetPHID($phid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getReceiver() {
|
public function getReceiver() {
|
||||||
return $this->assertAttached($this->receiver);
|
return $this->assertAttached($this->receiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBuildTarget() {
|
|
||||||
return $this->getReceiver();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function attachReceiver($receiver) {
|
public function attachReceiver($receiver) {
|
||||||
$this->receiver = $receiver;
|
$this->receiver = $receiver;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Reference in a new issue