mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
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
This commit is contained in:
parent
e6d8e1a00a
commit
bd8071bb33
2 changed files with 10 additions and 0 deletions
2
resources/sql/patches/20131004.dxedgekey.sql
Normal file
2
resources/sql/patches/20131004.dxedgekey.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_differential.edge
|
||||
ADD UNIQUE KEY `key_dst` (dst, type, src);
|
|
@ -1652,6 +1652,14 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
|
|||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20130929.filepolicy.sql'),
|
||||
),
|
||||
'20131004.dxedgekey.sql' => array(
|
||||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20131004.dxedgekey.sql'),
|
||||
),
|
||||
'20131004.dxreviewers.php' => array(
|
||||
'type' => 'php',
|
||||
'name' => $this->getPatchPath('20131004.dxreviewers.php'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue