1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +01:00

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
This commit is contained in:
epriestley 2013-09-12 13:04:09 -07:00
parent 1c43fceffb
commit 8f8c61be31
5 changed files with 5 additions and 26 deletions

View file

@ -0,0 +1 @@
DROP TABLE IF EXISTS {$NAMESPACE}_maniphest.maniphest_touch;

View file

@ -62,25 +62,12 @@ final class DifferentialSearchIndexer
->withNotDraft(true)
->execute();
$touches = array();
foreach (array_merge($comments, $inlines) as $comment) {
if (strlen($comment->getContent())) {
$doc->addField(
PhabricatorSearchField::FIELD_COMMENT,
$comment->getContent());
}
$author = $comment->getAuthorPHID();
$touches[$author] = $comment->getDateCreated();
}
foreach ($touches as $touch => $time) {
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_TOUCH,
$touch,
PhabricatorPeoplePHIDTypeUser::TYPECONST,
$time);
}
$rev->loadRelationships();

View file

@ -43,7 +43,6 @@ final class ManiphestSearchIndexer
$task->getID());
$current_ccs = $task->getCCPHIDs();
$touches = array();
$owner = null;
$ccs = array();
foreach ($transactions as $transaction) {
@ -55,9 +54,6 @@ final class ManiphestSearchIndexer
$author = $transaction->getAuthorPHID();
// Record the most recent time they touched this object.
$touches[$author] = $transaction->getDateCreated();
switch ($transaction->getTransactionType()) {
case ManiphestTransactionType::TYPE_OWNER:
$owner = $transaction;
@ -100,14 +96,6 @@ final class ManiphestSearchIndexer
: $task->getDateCreated());
}
foreach ($touches as $touch => $time) {
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_TOUCH,
$touch,
PhabricatorPeoplePHIDTypeUser::TYPECONST,
$time);
}
// We need to load handles here since non-users may subscribe (mailing
// lists, e.g.)
$handles = id(new PhabricatorHandleQuery())

View file

@ -14,6 +14,5 @@ final class PhabricatorSearchRelationship {
const RELATIONSHIP_REPOSITORY = 'repo';
const RELATIONSHIP_OPEN = 'open';
const RELATIONSHIP_TOUCH = 'poke';
}

View file

@ -1572,6 +1572,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'name' =>
$this->getPatchPath('20130820.file-mailkey-populate.php'),
),
'20130912.maniphest.1.touch.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130912.maniphest.1.touch.sql'),
),
);
}
}