iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
23 stars 18 forks source link

"Delete This Game" should have an "Undo" mechanism #394

Open dfabulich opened 1 month ago

dfabulich commented 1 month ago

As it stands today, when moderators use the "Delete This Game" feature, this action can't be undone. Even when you opt to merge one game into another, we can't undo it.

The deleter/merger deletes/merges these features:

But the deleter just deletes these things; the merger simply updates all of those rows to change them to point to the new game, with no record that they used to point at an old game.

Furthermore, the merger doesn't merge any simple text fields:

And, of course, the cover art isn't merged, either. (I separately filed iftechfoundation/ifdb#395 that we should merge cover art when the target game doesn't even have cover art.)

All of this data on the deleted game is simply deleted forever, along with its edit history.

dfabulich commented 1 month ago

I think this would be an enormously challenging project; I don't expect that anybody will work on this any time soon. But I would be willing to review a PR (or, perhaps, a series of PRs?) to implement this.

When deleting, I think we'd want/need to move the deleted game and its history to an archive table. (I think it would not be wise to just mark the game as "deleted" and then try to update all of the other code in the entire site to avoid showing deleted games; it would be a neverending source of bugs.)

When merging, we'd need to keep a record of all the metadata that we merged, so we could click a button to put it all back where it came from.