diff --git a/resources/sql/patches/20130709.droptimeline.sql b/resources/sql/patches/20130709.droptimeline.sql new file mode 100644 index 0000000000..33c6bb4ad4 --- /dev/null +++ b/resources/sql/patches/20130709.droptimeline.sql @@ -0,0 +1 @@ +DROP DATABASE {$NAMESPACE}_timeline; diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 1a5c66e9db..230518ea0b 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -3011,7 +3011,7 @@ celerity_register_resource_map(array( ), 'people-profile-css' => array( - 'uri' => '/res/1f0e94c5/rsrc/css/application/people/people-profile.css', + 'uri' => '/res/d50d9502/rsrc/css/application/people/people-profile.css', 'type' => 'css', 'requires' => array( diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index e8a3e85f2c..db32e7d6b0 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1566,13 +1566,8 @@ phutil_register_library_map(array( 'PhabricatorTime' => 'infrastructure/time/PhabricatorTime.php', 'PhabricatorTimeGuard' => 'infrastructure/time/PhabricatorTimeGuard.php', 'PhabricatorTimeTestCase' => 'infrastructure/time/__tests__/PhabricatorTimeTestCase.php', - 'PhabricatorTimelineCursor' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php', - 'PhabricatorTimelineDAO' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php', - 'PhabricatorTimelineEvent' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineEvent.php', - 'PhabricatorTimelineEventData' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php', 'PhabricatorTimelineEventView' => 'view/layout/PhabricatorTimelineEventView.php', 'PhabricatorTimelineExample' => 'applications/uiexample/examples/PhabricatorTimelineExample.php', - 'PhabricatorTimelineIterator' => 'infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php', 'PhabricatorTimelineView' => 'view/layout/PhabricatorTimelineView.php', 'PhabricatorToken' => 'applications/tokens/storage/PhabricatorToken.php', 'PhabricatorTokenController' => 'applications/tokens/controller/PhabricatorTokenController.php', @@ -3512,13 +3507,8 @@ phutil_register_library_map(array( 'PhabricatorTestStorageEngine' => 'PhabricatorFileStorageEngine', 'PhabricatorTestWorker' => 'PhabricatorWorker', 'PhabricatorTimeTestCase' => 'PhabricatorTestCase', - 'PhabricatorTimelineCursor' => 'PhabricatorTimelineDAO', - 'PhabricatorTimelineDAO' => 'PhabricatorLiskDAO', - 'PhabricatorTimelineEvent' => 'PhabricatorTimelineDAO', - 'PhabricatorTimelineEventData' => 'PhabricatorTimelineDAO', 'PhabricatorTimelineEventView' => 'AphrontView', 'PhabricatorTimelineExample' => 'PhabricatorUIExample', - 'PhabricatorTimelineIterator' => 'Iterator', 'PhabricatorTimelineView' => 'AphrontView', 'PhabricatorToken' => array( diff --git a/src/applications/differential/editor/DifferentialCommentEditor.php b/src/applications/differential/editor/DifferentialCommentEditor.php index 0bc098d751..9c5d873824 100644 --- a/src/applications/differential/editor/DifferentialCommentEditor.php +++ b/src/applications/differential/editor/DifferentialCommentEditor.php @@ -613,10 +613,6 @@ final class DifferentialCommentEditor extends PhabricatorEditor { 'actor_phid' => $actor_phid, ); - // TODO: Get rid of this - id(new PhabricatorTimelineEvent('difx', $event_data)) - ->recordEvent(); - id(new PhabricatorFeedStoryPublisher()) ->setStoryType('PhabricatorFeedStoryDifferential') ->setStoryData($event_data) diff --git a/src/applications/differential/editor/DifferentialRevisionEditor.php b/src/applications/differential/editor/DifferentialRevisionEditor.php index 5b6d90beab..76f8b50d0c 100644 --- a/src/applications/differential/editor/DifferentialRevisionEditor.php +++ b/src/applications/differential/editor/DifferentialRevisionEditor.php @@ -414,8 +414,6 @@ final class DifferentialRevisionEditor extends PhabricatorEditor { : $this->getComments(), 'actor_phid' => $revision->getAuthorPHID(), ); - id(new PhabricatorTimelineEvent('difx', $event_data)) - ->recordEvent(); $mailed_phids = array(); if (!$this->silentUpdate) { diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php index cac1946506..b8a693a48f 100644 --- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php @@ -307,13 +307,6 @@ final class PhabricatorRepositoryPullLocalDaemon $data->save(); $commit->saveTransaction(); - $event = new PhabricatorTimelineEvent( - 'cmit', - array( - 'id' => $commit->getID(), - )); - $event->recordEvent(); - $this->insertTask($repository, $commit); queryfx( diff --git a/src/infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php b/src/infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php deleted file mode 100644 index 4b9b988d25..0000000000 --- a/src/infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php +++ /dev/null @@ -1,100 +0,0 @@ -cursorName = $cursor_name; - $this->eventTypes = $event_types; - } - - protected function loadEvents() { - if (!$this->cursor) { - $this->cursor = id(new PhabricatorTimelineCursor())->loadOneWhere( - 'name = %s', - $this->cursorName); - if (!$this->cursor) { - $cursor = new PhabricatorTimelineCursor(); - $cursor->setName($this->cursorName); - $cursor->setPosition(0); - $cursor->save(); - - $this->cursor = $cursor; - } - } - - $event = new PhabricatorTimelineEvent('NULL'); - $event_data = new PhabricatorTimelineEventData(); - $raw_data = queryfx_all( - $event->establishConnection('r'), - 'SELECT event.*, event_data.eventData eventData - FROM %T event - LEFT JOIN %T event_data ON event_data.id = event.dataID - WHERE event.id > %d AND event.type in (%Ls) - ORDER BY event.id ASC LIMIT %d', - $event->getTableName(), - $event_data->getTableName(), - $this->cursor->getPosition(), - $this->eventTypes, - self::LOAD_CHUNK_SIZE); - - $events = $event->loadAllFromArray($raw_data); - $events = mpull($events, null, 'getID'); - $raw_data = ipull($raw_data, 'eventData', 'id'); - foreach ($raw_data as $id => $data) { - if ($data) { - $decoded = json_decode($data, true); - $events[$id]->setData($decoded); - } - } - - $this->events = $events; - - if ($this->events) { - $this->events = array_values($this->events); - $this->index = 0; - } else { - $this->cursor = null; - } - } - - public function current() { - return $this->events[$this->index]; - } - - public function key() { - return $this->events[$this->index]->getID(); - } - - public function next() { - if ($this->valid()) { - $this->cursor->setPosition($this->key()); - $this->cursor->save(); - } - - $this->index++; - if (!$this->valid()) { - $this->loadEvents(); - } - } - - public function valid() { - return isset($this->events[$this->index]); - } - - public function rewind() { - if (!$this->valid()) { - $this->loadEvents(); - } - } - -} diff --git a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php b/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php deleted file mode 100644 index c11b88de3f..0000000000 --- a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php +++ /dev/null @@ -1,26 +0,0 @@ - self::IDS_MANUAL, - self::CONFIG_TIMESTAMPS => false, - ) + parent::getConfiguration(); - } - - public function shouldInsertWhenSaved() { - if ($this->position == 0) { - return true; - } - return false; - } - -} diff --git a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php b/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php deleted file mode 100644 index b9cf020a9e..0000000000 --- a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php +++ /dev/null @@ -1,9 +0,0 @@ -type = $type; - $this->data = $data; - } - - public function getConfiguration() { - return array( - self::CONFIG_TIMESTAMPS => false, - ) + parent::getConfiguration(); - } - - public function recordEvent() { - if ($this->getID()) { - throw new Exception("Event has already been recorded!"); - } - - // Save the data first and point to it from the event to avoid a race - // condition where we insert the event before the data and a consumer reads - // it immediately. - if ($this->data !== null) { - $data = new PhabricatorTimelineEventData(); - $data->setEventData($this->data); - $data->save(); - - $this->setDataID($data->getID()); - } - - $this->save(); - } - - public function setData($data) { - $this->data = $data; - return $this; - } - - public function getData() { - return $this->data; - } - -} diff --git a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php b/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php deleted file mode 100644 index c786300a30..0000000000 --- a/src/infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - 'eventData' => self::SERIALIZATION_JSON, - ), - self::CONFIG_TIMESTAMPS => false, - ) + parent::getConfiguration(); - } - -} diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 6db6e45dd6..050595b620 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -1430,6 +1430,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'php', 'name' => $this->getPatchPath('20130703.legalpaddocdenorm.php'), ), + '20130709.droptimeline.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('20130709.droptimeline.sql'), + ), ); } }