Audit - delete duplicate audit requests and add unique key

Summary: Fixes T1768. This is mostly a data cleanliness issue as duplicate rows don't really do anything, but let's clear it up now.

Test Plan: made some duplicate rows by adding the same auditor multiple times. ran ./bin/storage upgrade and it worked perfectly!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T1768

Differential Revision: https://secure.phabricator.com/D10849
This commit is contained in:
Bob Trahan
2014-11-13 16:11:57 -08:00
parent 3fd16a9ba5
commit 310373ebc4
2 changed files with 26 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ final class PhabricatorRepositoryAuditRequest
'auditorPHID' => array(
'columns' => array('auditorPHID', 'auditStatus'),
),
'key_unique' => array(
'columns' => array('commitPHID', 'auditorPHID'),
'unique' => true,
),
),
) + parent::getConfiguration();
}