From 596a531ed6a8671499cc75f74c04c19ccd91707a Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 20 Aug 2013 09:50:27 -0700 Subject: [PATCH] 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 --- src/__phutil_library_map__.php | 2 - .../releeph/editor/ReleephBranchEditor.php | 18 --------- .../releeph/storage/event/ReleephEvent.php | 39 ------------------- 3 files changed, 59 deletions(-) delete mode 100644 src/applications/releeph/storage/event/ReleephEvent.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index de7cbcd5ef..7caa1ae8dc 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -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( diff --git a/src/applications/releeph/editor/ReleephBranchEditor.php b/src/applications/releeph/editor/ReleephBranchEditor.php index 61fbce06f8..97f6be9b04 100644 --- a/src/applications/releeph/editor/ReleephBranchEditor.php +++ b/src/applications/releeph/editor/ReleephBranchEditor.php @@ -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(); } } diff --git a/src/applications/releeph/storage/event/ReleephEvent.php b/src/applications/releeph/storage/event/ReleephEvent.php deleted file mode 100644 index e3333ec4e6..0000000000 --- a/src/applications/releeph/storage/event/ReleephEvent.php +++ /dev/null @@ -1,39 +0,0 @@ - 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; - } - } - -}