Page MenuHomePhorge

Deleting a specific Phriction version
Closed, ResolvedPublic

Asked by valerio.bozzolan on Nov 21 2023, 16:12.

Details

I'm curious if Phorge supports the ability to delete a specific Phriction wiki version internally. Have you ever tried?

At the moment it's not easy to me to figure this out, since I cannot easily retrieve the version PHID from the history, since the version PHIDs are not exposed from the frontend as far as I can see. So, I cannot run ./bin/remove destroy PHID-.... as usual.

I ask, since at the moment I just destroy the whole Phriction document and I manually re-create it, if just a single edit contains something that should be nuked.

Answers

valerio.bozzolan
Updated 52 Days Ago

Workaround:

$ phriction_id=123
$ sudo mysql -tt phabricator_phriction <<< "SELECT phid FROM phriction_document WHERE id = $phriction_id;
+--------------------------------+
| phid                           |
+--------------------------------+
| PHID-WIKI-drblsyieu4dshjtef7j7 |
+--------------------------------+

$ phriction_phid=PHID-WIKI-drblsyieu4dshjtef7j7
$ sudo mysql -tt phabricator_phriction <<< "SELECT phid, version FROM phriction_content WHERE documentPHID = '$phriction_phid' ORDER BY version"
+--------------------------------+---------+
| phid                           | version |
+--------------------------------+---------+
| PHID-WRDS-jn37qg4hprxmqgvx7orm |       1 |
| PHID-WRDS-l2jzu7sy2xnrektug6pu |       2 |
| PHID-WRDS-yvlgo2jzb3q3wmyafpo5 |       3 |
| PHID-WRDS-36vt56bxbhwbl3y4yslj |       4 |
| PHID-WRDS-2qik6tdes6f3y4so5jak |       5 |
| PHID-WRDS-ohd62hrjghgl5usmvoi3 |       6 |
| PHID-WRDS-jneod5tgstwdarl5mezl |       7 |
| PHID-WRDS-hdqrpecs54x6vlxs4dhh |       8 |
| PHID-WRDS-3hji5vknvirzfczzkkhd |       9 |
| PHID-WRDS-l55fzernfr5v7tmghi6b |      10 |
+--------------------------------+---------+

Now that you know which PHID is assigned to which version, to remove version 9:

./bin/remove destroy PHID-WRDS-3hji5vknvirzfczzkkhd

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.