mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Clean up repositories with symbols correctly
Summary: We currently try to delete symbols by ID, but the table has a multipart primary key and no `id` column. Test Plan: Ran query locally; had @JThramer verify fix in his environment. Reviewers: btrahan Reviewed By: btrahan CC: JThramer, aran Differential Revision: https://secure.phabricator.com/D4626
This commit is contained in:
parent
651929dec1
commit
2584af2cb8
1 changed files with 5 additions and 8 deletions
|
@ -34,15 +34,12 @@ final class PhabricatorRepositoryArcanistProject
|
|||
|
||||
public function delete() {
|
||||
$this->openTransaction();
|
||||
$conn_w = $this->establishConnection('w');
|
||||
|
||||
$symbols = id(new PhabricatorRepositorySymbol())->loadAllWhere(
|
||||
'arcanistProjectID = %d',
|
||||
$this->getID()
|
||||
);
|
||||
foreach ($symbols as $symbol) {
|
||||
$symbol->delete();
|
||||
}
|
||||
queryfx(
|
||||
$this->establishConnection('w'),
|
||||
'DELETE FROM %T WHERE arcanistProjectID = %d',
|
||||
id(new PhabricatorRepositorySymbol())->getTableName(),
|
||||
$this->getID());
|
||||
|
||||
$result = parent::delete();
|
||||
$this->saveTransaction();
|
||||
|
|
Loading…
Reference in a new issue