@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Remove legacy "touched" table and indexing

Summary: Noticed this in the schema. "Touches" were an idea that never really got off the ground, as we built out more/better notification channels instead. Essentially, they recorded any object you'd ever interacted with. Maybe this will be useful some day, but for now it does nothing and can't be interacted with. Nuke it.

Test Plan: `grep`, loaded Maniphest.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6953

+5 -26
+1
resources/sql/patches/20130912.maniphest.1.touch.sql
··· 1 + DROP TABLE IF EXISTS {$NAMESPACE}_maniphest.maniphest_touch;
-13
src/applications/differential/search/DifferentialSearchIndexer.php
··· 62 62 ->withNotDraft(true) 63 63 ->execute(); 64 64 65 - $touches = array(); 66 - 67 65 foreach (array_merge($comments, $inlines) as $comment) { 68 66 if (strlen($comment->getContent())) { 69 67 $doc->addField( 70 68 PhabricatorSearchField::FIELD_COMMENT, 71 69 $comment->getContent()); 72 70 } 73 - 74 - $author = $comment->getAuthorPHID(); 75 - $touches[$author] = $comment->getDateCreated(); 76 - } 77 - 78 - foreach ($touches as $touch => $time) { 79 - $doc->addRelationship( 80 - PhabricatorSearchRelationship::RELATIONSHIP_TOUCH, 81 - $touch, 82 - PhabricatorPeoplePHIDTypeUser::TYPECONST, 83 - $time); 84 71 } 85 72 86 73 $rev->loadRelationships();
-12
src/applications/maniphest/search/ManiphestSearchIndexer.php
··· 43 43 $task->getID()); 44 44 45 45 $current_ccs = $task->getCCPHIDs(); 46 - $touches = array(); 47 46 $owner = null; 48 47 $ccs = array(); 49 48 foreach ($transactions as $transaction) { ··· 54 53 } 55 54 56 55 $author = $transaction->getAuthorPHID(); 57 - 58 - // Record the most recent time they touched this object. 59 - $touches[$author] = $transaction->getDateCreated(); 60 56 61 57 switch ($transaction->getTransactionType()) { 62 58 case ManiphestTransactionType::TYPE_OWNER: ··· 98 94 $owner 99 95 ? $owner->getDateCreated() 100 96 : $task->getDateCreated()); 101 - } 102 - 103 - foreach ($touches as $touch => $time) { 104 - $doc->addRelationship( 105 - PhabricatorSearchRelationship::RELATIONSHIP_TOUCH, 106 - $touch, 107 - PhabricatorPeoplePHIDTypeUser::TYPECONST, 108 - $time); 109 97 } 110 98 111 99 // We need to load handles here since non-users may subscribe (mailing
-1
src/applications/search/constants/PhabricatorSearchRelationship.php
··· 14 14 const RELATIONSHIP_REPOSITORY = 'repo'; 15 15 16 16 const RELATIONSHIP_OPEN = 'open'; 17 - const RELATIONSHIP_TOUCH = 'poke'; 18 17 19 18 }
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1572 1572 'name' => 1573 1573 $this->getPatchPath('20130820.file-mailkey-populate.php'), 1574 1574 ), 1575 + '20130912.maniphest.1.touch.sql' => array( 1576 + 'type' => 'sql', 1577 + 'name' => $this->getPatchPath('20130912.maniphest.1.touch.sql'), 1578 + ), 1575 1579 ); 1576 1580 } 1577 1581 }