Results 1 to 2 of 2
  1.    #1  
    If I release an update for an app that uses the sqlite database, will the current database be deleted when the old version of the app is deleted from the phone?

    If I wanted to update the database structure, would I have to perform that update in my code (i.e. when the user first opens the app, have my code remove the database and then recreate it)?
  2. #2  
    The database (structure and data) are deleted if the app is deleted from the phone. But if merely installing an update to the app (without deleting the old version) then the database (structure and data) remain intact. If you are updating the database structure in the new version then you either need to tell your users to delete the previous version first, or you need to have your code backup any existing data, then perform a "drop table if exists" SQL statement, then create a new table with the new structure and restore the data back to it. Depending on your situation, you may be willing to forgo the backup/restore step and simply drop the old table everytime and create a new table everytime the app is launched.
    Developer of: FFplayer - a file/folder based music player. FFplayer home

Posting Permissions