mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Permanently destroy Almanac properties with the destruction engine
Summary: As suggested in D14461. Test Plan: Used `./bin/remove destroy` on an Almanac service with properties attached, saw entries removed from the `phabricator_almanac.almanac_property` table. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14490
This commit is contained in:
parent
67b6c532bc
commit
1a84a2fe4b
1 changed files with 15 additions and 0 deletions
|
@ -92,6 +92,10 @@ final class PhabricatorDestructionEngine extends Phobject {
|
|||
$token->delete();
|
||||
}
|
||||
}
|
||||
|
||||
if ($object instanceof AlmanacPropertyInterface) {
|
||||
$this->destroyAlmanacProperties($object_phid);
|
||||
}
|
||||
}
|
||||
|
||||
private function destroyEdges($src_phid) {
|
||||
|
@ -148,4 +152,15 @@ final class PhabricatorDestructionEngine extends Phobject {
|
|||
$object_phid);
|
||||
}
|
||||
|
||||
private function destroyAlmanacProperties($object_phid) {
|
||||
$table = new AlmanacProperty();
|
||||
$conn_w = $table->establishConnection('w');
|
||||
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'DELETE FROM %T WHERE objectPHID = %s',
|
||||
$table->getTableName(),
|
||||
$object_phid);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue