-
Notifications
You must be signed in to change notification settings - Fork 433
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
Add blob columns for bsddb upgrade #1969
base: maintenance/gramps60
Are you sure you want to change the base?
Conversation
So I had time to try this out, and we are far from done. I had to change the metadata blob location to "value" rather than "blob_data". Then I had to enclose some db.execute with transaction begin/commit to avoid a crash there. Here is the code I used:
The next issue is that the metadata created in this step is not suitable for later conversion from json, most of it is just "None" rather than textual json data. Here is what the db looks like after bsddb conversion (it crashes when reading metadata). |
@prculley added two fixes to this PR. Surely we must be getting close! Thanks for your patience. |
Once @prculley verifies this PR works, I'll remove the adding of the value column in metadata, as we are going to add that on database creation. |
Next problem I had was that name_formats, when empty, should be initialized to a list.
The next problem appears after the bsddb conversion to sqlite is done. At this point, the sqlite db metadata contains both blob (value column) AND json_data. When the dbloader loop opens the sqlite db again to continue the upgrade process, the code in gen.db.generic tests for blob/json
which sets json since the metadata has both columns. |
I think we have these issues fixed in #1974 |
I reverted #1974 because it caused a crash when exiting Gramps. |
This PR fixes an oversight for bsddb upgrades.