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

"Regenerate summaries" duplicates the data #277

Closed
jabra11 opened this issue Dec 11, 2021 · 4 comments
Closed

"Regenerate summaries" duplicates the data #277

jabra11 opened this issue Dec 11, 2021 · 4 comments
Assignees
Labels
bug Something isn't working prio a

Comments

@jabra11
Copy link
Contributor

jabra11 commented Dec 11, 2021

Describe the bug
I noticed that there were some entries saved as "python" and "Python", therefore I tried to use the "Regenerate summaries" function exposed on the webinterface, which just duplicated my data. Luckily I saved the database file before doing it and everything is back to normal by replacing the new one with the old one, so no damage was done.

System information

  • Wakapi version: 1.30.1
  • OS: Debian
  • Database (SQLite, MySQL, ... ?): SQLite (the default option)
@jabra11 jabra11 changed the title "Regenerate summaries' duplicates "Regenerate summaries" duplicates the data Dec 11, 2021
@muety
Copy link
Owner

muety commented Dec 13, 2021

Thanks for bringing this up! I was able to reproduce the error. It only seems to happen on SQLite (again... 🙄). I'll fix this as soon as possible.

@muety muety self-assigned this Dec 13, 2021
@muety muety added bug Something isn't working prio a labels Dec 13, 2021
@muety
Copy link
Owner

muety commented Dec 14, 2021

I think I figured out the problem and did some code changes (see latest version 1.30.2). However, you will have to manually migrate your SQLite database in order for it to respect foreign key constraints, see Enabling SQLite foreign key constraints. Sorry for the inconveniences.

@jabra11
Copy link
Contributor Author

jabra11 commented Dec 14, 2021

Hi, I did what was described on the link and it seemed to work. It threw some errors though: https://pastebin.com/n4BiWA00.
But regenerating the summaries worked as expected. Thanks

@muety
Copy link
Owner

muety commented Dec 14, 2021

These errors most likely relate to summary items that don't have a corresponding summary anymore, i.e. are orphans, caused by the broken cascading before. I'd say you can smoothly ignore them.

@muety muety closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio a
Projects
None yet
Development

No branches or pull requests

2 participants