@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a `(dst, type, src)` key to Differential's edge table

Summary:
Ref T1279. This came to me in a dream.

The existing `differential_relationship` table has an `(objectPHID, type)` column, which theoretically is useful for queries like "revisions with X as a reviewer". In practice, I'm not sure it gets used much, but I can get it to show up in at least some query plans.

Add a similar index to the `edge` table. This sequences //before// D7227, which actually migrates the data.

Test Plan:
- Ran `bin/storage upgrade`.
- EXPLAIN'd a bunch of queries against different versions of the schema, this seemed helpful overall.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1279

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

Conflicts:
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php

+10
+2
resources/sql/patches/20131004.dxedgekey.sql
··· 1 + ALTER TABLE {$NAMESPACE}_differential.edge 2 + ADD UNIQUE KEY `key_dst` (dst, type, src);
+8
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1652 1652 'type' => 'sql', 1653 1653 'name' => $this->getPatchPath('20130929.filepolicy.sql'), 1654 1654 ), 1655 + '20131004.dxedgekey.sql' => array( 1656 + 'type' => 'sql', 1657 + 'name' => $this->getPatchPath('20131004.dxedgekey.sql'), 1658 + ), 1659 + '20131004.dxreviewers.php' => array( 1660 + 'type' => 'php', 1661 + 'name' => $this->getPatchPath('20131004.dxreviewers.php'), 1662 + ), 1655 1663 ); 1656 1664 } 1657 1665 }