Skip to content

Conversation

@Gykes
Copy link
Collaborator

@Gykes Gykes commented Dec 19, 2025

This PR allows users to delete database duplicate entries via the playground. I was able to add a dummy secondary data to some images that were located in my database and then delete them accordingly.

For WP: I changed up the verbage of the variables a little bit as I felt like "DestroyFiles" could be misinterpreted by users. I kept the logic the same but modified it to "DestroyFileEntries"

This example deletes an entry with the ID of 10:

mutation {                                                                                                         
    deleteFileEntries(ids: ["10"])                                                                         
  }  

This is an example of removing a primary entry. It should error out and let the user know that it is a primary entry:

{
  "errors": [
    {
      "message": "cannot destroy primary file entry /Users/gykes/Desktop/blah.mkv",
      "path": [
        "deleteFileEntries"
      ]
    }
  ],
  "data": null
}

Also added destroy_file_entry option to SceneDestroyInput, ScenesDestroyInput, ImageDestroyInput, ImagesDestroyInput, and GalleryDestroyInput. This allows deleting the file DB entry (without removing the actual file) when destroying content.

fixes: #6355

@Gykes Gykes added this to the Version 0.31.0 milestone Dec 23, 2025
Copy link
Collaborator

@WithoutPants WithoutPants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For WP: I changed up the verbage of the variables a little bit as I felt like "DestroyFiles" could be misinterpreted by users. I kept the logic the same but modified it to "DestroyFileEntries"

You've named it deleteFileEntries which is inconsistent with other destroy operations. I personally think destroyFiles is fine, assuming that it is properly documented, but destroyFileEntries is still better than the current naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add interfaces to destroy file database entries

2 participants