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

Deleting categories is not working properly #249

Open
jueank opened this issue Nov 20, 2024 · 3 comments
Open

Deleting categories is not working properly #249

jueank opened this issue Nov 20, 2024 · 3 comments

Comments

@jueank
Copy link

jueank commented Nov 20, 2024

When deleting a user created category that has been assigned to multiple tables. The category disappears from PinballYs list of categories, but reappears when PinballY is started next time. It seems that PinballY doesnot completely scan through all entries.

Besides of this behavior, I think it would be a welcomed change if PinballY throws out the support & compatibility of PinballX 'database' file (who cares for PinballX in 2024 anyway) and switches to an internal persistence tailored for PinballYs needs. Either file based, or DB based (sqlite?). But not the mixture of PinballX XML file plus gamestats.csv

@mjrgh
Copy link
Owner

mjrgh commented Nov 21, 2024

I'll take a look at it. I'm not entirely certain that this is not the intended behavior, in that it might be too dangerous to do the cascading deletes, but It should probably at least warn (and describe the required action to manually delete the cross-references) if this is the case.

I'd definitely love to ditch the legacy PBX XML format and switch to a single, internally consistent database format that doesn't cause insanity when closely inspected. But that would be such a compatibility-breaking change that I think I could only contemplate it for a major version change, at least a whole number change to 2.0 (say), if not a full letter change to Pinball Z.

@jueank
Copy link
Author

jueank commented Nov 21, 2024

Why is compatibility a concern?
I would suggest implementing it in a way that allows for a one-time migration when upgrading from PinballY 1.x to PinballY 2.0.
I may be mistaken, but I don't believe there is a single user who is using PinballY and PinballX in parallel, accessing the same XML database file.
You could switch to an internal database implementation and allow a manual or automated sync of the internal database and an external PinballX file, if you really want to keep compatibility.

@jueank
Copy link
Author

jueank commented Nov 30, 2024

I think the original issue is obsolete. It may have been a mistake on my part, but I'm not sure. Quick explanation: In my installation, I found a second xml file in the PinballX.xml folder with an identical structure, but containing only the entries of one category. This file also has the same name as the category itself. Either I created this file a few months ago in a state of mental derangement and don't remember it, or there is some strange functionality in PinballY that causes such a file to be created when editing categories. In any case, PinballY worked with both files - without me being aware of it. I suspect that deleting the category did not work correctly because the table entries were spread over the two files.

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

No branches or pull requests

2 participants