Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Upgrade path and migration of database to fix issue #121 for affected users #122

Closed
joshirio opened this issue Jan 27, 2020 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@joshirio
Copy link
Collaborator

joshirio commented Jan 27, 2020

See issue #121

Currently all users who are using duplicated collections have many records in the database file with the sql table column _id set to NULL this causes issues when exporting and printing, ie. no records are retrieved.

Since the original issue has been fixed, we need a migration plan for users that have databases affected by this inconsistency. The solution would be to include an upgrade path with the 2.6 release that automatically upgrade the database on first start-up.

If implemented all users will have consistent data sets again after installing the 2.6 release.

Technical note:
SQLite doesn't allow editing tables directly so an approach would be to create temporary copies of affected tables and to recreate them properly with PRIMRARY KEY constraints, see https://www.sqlite.org/faq.html#q11

@joshirio joshirio self-assigned this Jan 27, 2020
@joshirio joshirio added the bug label Jan 27, 2020
@joshirio joshirio added this to the 2.6 milestone Jan 27, 2020
joshirio added a commit that referenced this issue Jan 29, 2020
detect inconsistent data sets not by NULL checking but directly by searchng for tables without PRIMARY KEY constraints, this allows to fix duplicated collections where new records were not yet added and thus have no NULL _id records
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant