kaspiana / mage

A command-line tool for cataloguing images (particularly digital art), styled after Git.
0 stars 0 forks source link

Safer document deletion #35

Closed kaspiana closed 3 months ago

kaspiana commented 3 months ago

Rather than documents being immediately erased from the database when using the mage delete command, they are merely marked as deleted and hidden from results through the use of SQL views like public_document.

However, this does remove any option to truly delete a document. This will need be re-added at some point. The user can manually delete the document's file if they wish, and since the document is marked as deleted in the database, this should not be problematic, except as regards dangling hard links in views.

'Public' may not be ideal terminology here.

Resolves #30