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

Add missing indexes to DrydockRepositoryOperation

Summary: See PHI1885. Repository operations are queryable by state and author, but neither column has a usable key. Add usable keys.

Test Plan: Ran EXPLAIN on a state query. Ran `bin/storage upgrade`. Ran EXPLAIN again, saw query go from a table scan to a `const` key lookup.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Differential Revision: https://secure.phabricator.com/D21465
This commit is contained in:
epriestley 2020-09-17 12:06:52 -07:00
parent 969587f7b0
commit a754c694de

View file

@ -55,6 +55,12 @@ final class DrydockRepositoryOperation extends DrydockDAO
'key_repository' => array(
'columns' => array('repositoryPHID', 'operationState'),
),
'key_state' => array(
'columns' => array('operationState'),
),
'key_author' => array(
'columns' => array('authorPHID', 'operationState'),
),
),
) + parent::getConfiguration();
}