jeudi 2 avril 2015

Upgrade pre-installed database with new data

I want to ship my app with pre-installed database, that contains table filled with data. Also I want to allow user to modify one column of this table (boolean isFavorite flag). Moreover, in future app updates I want to upgrade database with new data, but I want to keep user changes safe.


For this purposes I wanted to use http://ift.tt/1dBxfAL library. It handles database upgrade automatically using sql scripts. But it seems like it can only upgrade scheme of database, but unable to add new data. So I wondering if there is a solution which allows:



  • Ship application with existing filled database storead as sqlite file in assets folder

  • Upgrate database with new data as the application upgrades

  • Upgrate database scheme as the application upgrades

  • Retain user data (one column) during upgrade


I investigated multiple questions on SO, but haven't found the solution of upgrading database with new data.


Aucun commentaire:

Enregistrer un commentaire