mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Remove ReleephEvent
Summary: Ref T3663. This is a proto-transaction record which is obsoleted by real transactions. It has no UI, so I'm not bothering to retain/migrate the data since there's no regression. Just get rid of it and all its writers. I'm keeping the table for now in case something crazy uses this somehow, so no data is actually destroyed. Test Plan: `grep` Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3663 Differential Revision: https://secure.phabricator.com/D6784
This commit is contained in:
parent
d243c30190
commit
596a531ed6
3 changed files with 0 additions and 59 deletions
|
@ -1960,7 +1960,6 @@ phutil_register_library_map(array(
|
|||
'ReleephDiffMessageFieldSpecification' => 'applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php',
|
||||
'ReleephDiffSizeFieldSpecification' => 'applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php',
|
||||
'ReleephDifferentialRevisionDetailRenderer' => 'applications/releeph/differential/ReleephDifferentialRevisionDetailRenderer.php',
|
||||
'ReleephEvent' => 'applications/releeph/storage/event/ReleephEvent.php',
|
||||
'ReleephFieldParseException' => 'applications/releeph/field/exception/ReleephFieldParseException.php',
|
||||
'ReleephFieldSelector' => 'applications/releeph/field/selector/ReleephFieldSelector.php',
|
||||
'ReleephFieldSpecification' => 'applications/releeph/field/specification/ReleephFieldSpecification.php',
|
||||
|
@ -4140,7 +4139,6 @@ phutil_register_library_map(array(
|
|||
'ReleephDiffChurnFieldSpecification' => 'ReleephFieldSpecification',
|
||||
'ReleephDiffMessageFieldSpecification' => 'ReleephFieldSpecification',
|
||||
'ReleephDiffSizeFieldSpecification' => 'ReleephFieldSpecification',
|
||||
'ReleephEvent' => 'ReleephDAO',
|
||||
'ReleephFieldParseException' => 'Exception',
|
||||
'ReleephFieldSpecification' =>
|
||||
array(
|
||||
|
|
|
@ -71,13 +71,6 @@ final class ReleephBranchEditor extends PhabricatorEditor {
|
|||
->save();
|
||||
}
|
||||
|
||||
id(new ReleephEvent())
|
||||
->setType(ReleephEvent::TYPE_BRANCH_CREATE)
|
||||
->setActorPHID($this->requireActor()->getPHID())
|
||||
->setReleephProjectID($this->releephProject->getID())
|
||||
->setReleephBranchID($branch->getID())
|
||||
->save();
|
||||
|
||||
$table->saveTransaction();
|
||||
return $branch;
|
||||
}
|
||||
|
@ -85,21 +78,10 @@ final class ReleephBranchEditor extends PhabricatorEditor {
|
|||
// aka "close" and "reopen"
|
||||
public function changeBranchAccess($is_active) {
|
||||
$branch = $this->releephBranch;
|
||||
$branch->openTransaction();
|
||||
|
||||
$branch
|
||||
->setIsActive((int)$is_active)
|
||||
->save();
|
||||
|
||||
id(new ReleephEvent())
|
||||
->setType(ReleephEvent::TYPE_BRANCH_ACCESS)
|
||||
->setActorPHID($this->requireActor()->getPHID())
|
||||
->setReleephProjectID($branch->getReleephProjectID())
|
||||
->setReleephBranchID($branch->getID())
|
||||
->setDetail('isActive', $is_active)
|
||||
->save();
|
||||
|
||||
$branch->saveTransaction();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class ReleephEvent extends ReleephDAO {
|
||||
|
||||
const TYPE_BRANCH_CREATE = 'branch-create';
|
||||
const TYPE_BRANCH_ACCESS = 'branch-access-change';
|
||||
|
||||
protected $releephProjectID;
|
||||
protected $releephBranchID;
|
||||
protected $type;
|
||||
protected $epoch;
|
||||
protected $actorPHID;
|
||||
protected $details = array();
|
||||
|
||||
public function getConfiguration() {
|
||||
return array(
|
||||
self::CONFIG_SERIALIZATION => array(
|
||||
'details' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
public function getDetail($key, $default = null) {
|
||||
return idx($this->details, $key, $default);
|
||||
}
|
||||
|
||||
public function setDetail($key, $value) {
|
||||
$this->details[$key] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function willSaveObject() {
|
||||
parent::willSaveObject();
|
||||
if (!$this->epoch) {
|
||||
$this->epoch = $this->dateCreated;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue