I want that my users can read my sqlite database still in 10 years, because there could be data in it they want to browse.
Well the database file is 10 years old. In the meantime I have upgraded my database structure (additional fields is best example) and my latest version of the application makes use of that new fields.
Now the user wants to load the 10 year old database with the brandnew application version. But that won`t work, because in the old database file there are some fields missing.
How would you deal with such a scenario?
The easiest way to handle this is to leave your new application alone. Have it only work with the new format. In the long run this will be easier, because your program won’t have to account for working with a bunch of different data structures.
Create a program which “upgrades” (creates a new file and transfers the data etc. or however you want to handle it) the old database file to resemble the new one.