diff --git a/resources/sql/autopatches/20180212.harbor.01.receiver.sql b/resources/sql/autopatches/20180212.harbor.01.receiver.sql new file mode 100644 index 0000000000..84e9611db2 --- /dev/null +++ b/resources/sql/autopatches/20180212.harbor.01.receiver.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_buildmessage + CHANGE buildTargetPHID receiverPHID VARBINARY(64) NOT NULL; diff --git a/src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php b/src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php index 1b55f2e781..134c68ce04 100644 --- a/src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php +++ b/src/applications/harbormaster/query/HarbormasterBuildMessageQuery.php @@ -71,7 +71,7 @@ final class HarbormasterBuildMessageQuery if ($this->receiverPHIDs !== null) { $where[] = qsprintf( $conn, - 'buildTargetPHID IN (%Ls)', + 'receiverPHID IN (%Ls)', $this->receiverPHIDs); } diff --git a/src/applications/harbormaster/storage/HarbormasterBuildMessage.php b/src/applications/harbormaster/storage/HarbormasterBuildMessage.php index 5c9c92b2fc..1066a93610 100644 --- a/src/applications/harbormaster/storage/HarbormasterBuildMessage.php +++ b/src/applications/harbormaster/storage/HarbormasterBuildMessage.php @@ -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;