vendredi 29 janvier 2016

Manage database versioning on app Update [Android]

I have a local SQLite database on an Android app and I'm a bit confused on how to manage it when the app gets updated. I need to keep the data stored in the DB whenever I update the app but also I think i'm going to add columns and probably also tables. What's the best practice to do so?

My idea was to check the DB version and if it matches the old version call a method to add the new columns/tables and then upgrade the version, is it the correct approach or there's something else to consider?

Aucun commentaire:

Enregistrer un commentaire