diff --git a/resources/sql/autopatches/20150605.feed.index.sql b/resources/sql/autopatches/20150605.feed.index.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20150605.feed.index.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_feed.feed_storynotification + ADD INDEX key_object (primaryObjectPHID); diff --git a/src/applications/notification/storage/PhabricatorFeedStoryNotification.php b/src/applications/notification/storage/PhabricatorFeedStoryNotification.php --- a/src/applications/notification/storage/PhabricatorFeedStoryNotification.php +++ b/src/applications/notification/storage/PhabricatorFeedStoryNotification.php @@ -25,6 +25,9 @@ 'userPHID_2' => array( 'columns' => array('userPHID', 'hasViewed', 'primaryObjectPHID'), ), + 'key_object' => array( + 'columns' => array('primaryObjectPHID'), + ), ), ) + parent::getConfiguration(); }