Reputation: 31
I have a flutter application using ObjectBox as the database that's being stored in internal storage, and I ran into the problem of when I update the application version (for example version 1.0.0) to a new version (1.0.1) the data is lost. I'm not too sure if it's the internal storage at fault or the database.
I expect that regardless of updating the application the data stays persistent.
Upvotes: 0
Views: 761
Reputation: 31
After some research, I noticed I was saving the absolute path of the content in the database and upon updating the application the absolute path became obsolete therefore I resulted to saving the name of the content and then getting the internal storage then appending the two IT WORKS JUST FINE!
Upvotes: 1
Reputation: 681
Did you modify the schema at all (rename/change field types)? If so, your new schema will not match with the old. You'd need to go back and follow the information here: https://docs.objectbox.io/advanced/data-model-updates
Upvotes: 0