mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52: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() {
|
public function delete() {
|
||||||
$this->openTransaction();
|
$this->openTransaction();
|
||||||
$conn_w = $this->establishConnection('w');
|
|
||||||
|
|
||||||
$symbols = id(new PhabricatorRepositorySymbol())->loadAllWhere(
|
queryfx(
|
||||||
'arcanistProjectID = %d',
|
$this->establishConnection('w'),
|
||||||
$this->getID()
|
'DELETE FROM %T WHERE arcanistProjectID = %d',
|
||||||
);
|
id(new PhabricatorRepositorySymbol())->getTableName(),
|
||||||
foreach ($symbols as $symbol) {
|
$this->getID());
|
||||||
$symbol->delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = parent::delete();
|
$result = parent::delete();
|
||||||
$this->saveTransaction();
|
$this->saveTransaction();
|
||||||
|
|
Loading…
Reference in a new issue