-
-
Notifications
You must be signed in to change notification settings - Fork 413
Fix: Swapped IDs in parent_tags DB table #998
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
base: main
Are you sure you want to change the base?
Fix: Swapped IDs in parent_tags DB table #998
Conversation
Good fix, but for this to be merged a migration for existing libraries would be needed (tests would be nice too). @CyanVoxel I could have sworn to have reviewed or written a fix for this at some point, do you remember anything regarding that? |
There were several issues with swapped parent/child/"subtag" language during the migration to 9.5, this may have slipped by during those changes. I'm also not sure if just swapping the assignment will have the intended effect or if there needs to be additional logic changes reflected, though testing will either confirm or deny that |
Sorry if I'm talking over things that have already been discussed, I couldn't find anything related to this. For the migration, I believe checking whether the How would valid joins be differentiated from the swapped ones? |
All good, I was just under the impression that this had already been fixed, but apparently not.
Generally, I would suggest you increment |
Thanks, I'm not very familiar with the codebase so that's a big help. Will take a crack at it. |
I was initially concerned about such a case:
Wherein the database would contain a mixture of correctly parented tags as well as incorrect ones, with no clear way of telling them apart. However after some digging, it seems like this bug has been around since the first implementation of the Just leaving this here for clarity. |
In that case there would be no way to tell the correct and incorrect ones apart anyway so no need to worry about that on your end either way 😄 |
…e where it went wrong now lol)
Just need to write some tests now, then should be ready for review |
How are the test database fixtures in here created? Just blanks made by that specific version of tagstudio? Or is there some sort of tooling/procedure required to properly generate them? |
Not quite sure, @CyanVoxel would know best. |
Summary
Stops child/parent tag IDs from being assigned to incorrect fields in the
ts_library.sqlite
db'stag_parents
table as described in #997.Tasks Completed