Upstream: https://we.phorge.it/T15125
Running a command like aklapper@phab1001:~$ sudo /srv/phab/phabricator/bin/remove destroy F1234567890 to delete an uploaded file results in an exception:
Destroying objects... Destroying PhabricatorFile F30229934... [2022-09-26 13:17:19] EXCEPTION: (Exception) Unknown edge constant "26"! at [<phabricator>/src/infrastructure/edges/type/PhabricatorEdgeType.php:214] arcanist(), ava(), phabricator(), translations(), wmf-ext-misc() #0 <#2> PhabricatorEdgeType::getByConstant(string) called at [<phabricator>/src/infrastructure/edges/editor/PhabricatorEdgeEditor.php:179] #1 <#2> PhabricatorEdgeEditor::buildEdgeSpecs(string, string, string) called at [<phabricator>/src/infrastructure/edges/editor/PhabricatorEdgeEditor.php:78] #2 <#2> PhabricatorEdgeEditor::removeEdge(string, string, string) called at [<phabricator>/src/infrastructure/edges/engineextension/PhabricatorEdgesDestructionEngineExtension.php:32] #3 phlog(Exception) called at [<phabricator>/src/infrastructure/edges/engineextension/PhabricatorEdgesDestructionEngineExtension.php:39] #4 PhabricatorEdgesDestructionEngineExtension::destroyObject(PhabricatorDestructionEngine, PhabricatorFile) called at [<phabricator>/src/applications/system/engine/PhabricatorDestructionEngine.php:88] #5 PhabricatorDestructionEngine::destroyObject(PhabricatorFile) called at [<phabricator>/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php:158] #6 PhabricatorSystemRemoveDestroyWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492] #7 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:377] #8 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_remove.php:21] Permanently destroyed 1 object.