Use ActiveAndroid on existing database-content Use ActiveAndroid on existing database-content database database

Use ActiveAndroid on existing database-content


You would have to perform a data migration during runtime after the user upgrades to the newest version of the app. The process could be broken down into the following steps, I have also assigned database version values to each step.

  1. The user has all of their data stored in a SQLite database and has not upgraded their app yet. [DB = SQlite v1]

  2. On upgrade, when the user is upgrading to the next version of theapp read all data from the old SQLite database and store it into theActiveAndroid database. [DB = SQLite v1 and ActiveAndroid v1]

  3. Once all of the data has been migrated to the new ActiveAndroid database then delete all tables of the SQLite database so that you don't use extra storage space that you do not need. [DB = SQLite v2 and ActiveAndroid v1]

  4. In the next release you can then assume that user has had their data fully migrated and at this point it is finally safe to remove all code that was previously referencing the SQLite database. [DB = ActiveAndroid v2]