Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BookStats remaining after books have been deleted #460

Closed
cblanken opened this issue Aug 10, 2024 · 3 comments
Closed

BookStats remaining after books have been deleted #460

cblanken opened this issue Aug 10, 2024 · 3 comments
Labels
code-improvement Make code/structure better fixed Fixed in develop or master, to be launched.

Comments

@cblanken
Copy link
Contributor

Description
I'm not sure if it's intended but it seems like BookStat records remain even when a Book has been deleted.

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Start Lute with default database
  2. Delete books
  3. Check bookstats in SQLite Browser or via sqlite
  4. See bookstats for deleted books still exist

Screenshots

For example, the bookstats after having deleted all but a few of the default books.
image
image

@jzohrab
Copy link
Collaborator

jzohrab commented Aug 10, 2024

Whoops, not intended. Not a big deal, but should be cleaned up just for tidiness.

@jzohrab jzohrab added this to Lute-v3 Aug 10, 2024
@jzohrab jzohrab assigned jzohrab and unassigned jzohrab Aug 10, 2024
@jzohrab jzohrab added the code-improvement Make code/structure better label Aug 10, 2024
@jzohrab jzohrab moved this to In Progress in Lute-v3 Dec 22, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Dec 22, 2024

Thanks @cblanken for the issue. This was actually a very good catch: sqlite doesn't cascade deletes unless a pragma is set. For everything else the Lute data model took care of things properly but setting the pragma is still a good thing to do, so I added that and added a few checks and cleanup things.

Fixed in develop 👍

@jzohrab jzohrab added the fixed Fixed in develop or master, to be launched. label Dec 22, 2024
@jzohrab jzohrab moved this from In Progress to Done in Lute-v3 Dec 22, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Dec 25, 2024

Launched in 3.8.0.

@jzohrab jzohrab closed this as completed Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-improvement Make code/structure better fixed Fixed in develop or master, to be launched.
Projects
Archived in project
Development

No branches or pull requests

2 participants