Adds file attachment deletion logics:
- PhabricatorFile: delete the attachment if file is deleted
- destruction engine extension: delete attachment if object is deleted
- SQL patch: delete existing leftover attachments from deleted files
To apply the cleanup, as usual, run:
./bin/storage upgrade
This cleanup may take some time, proportionally to the size of these tables:
phabricator_file.file phabricator_file.file_attachment
Just as an indication: the storage upgrade, in a Phorge with file count 1.3M rows and file_attachment consisting in 9K rows, it may delete 170K rows in less than 1 second on average hardware.
Closes T15110