title: Sqlite database modifications and app updates in iOS
body: <p>I'm using a <code>sqlite</code> database in my iOS app. I have all its tables definitions in an <code>.sqlite</code> file I've placed in the "Supporting Files" group of the Xcode project, and in code I copy this file to "Documents" to be able to perform database operations. While developing, I've found that, when I need to add/remove a table or change its fields and I remove the <code>.sqlite</code> file from "Supporting Files" to add the new one, then I need to uninstall the app from the device or the simulator and build again to get the new database.</p>
  
  <p>How could I make changes in database tables by replacing the <code>.sqlite</code> file without having to uninstall the app? When the app will be submitted to the App Store, will the users have to reinstall the app when a new update with changes in database is available?</p>
  
  <p><strong>EDIT.</strong> Is it possible to replace the database and to keep/copy the data the user had in the old one? Or will user loose all the stored data when downloading an app update from the Store where the <code>.sqlite</code> database is replaced, as if he were installing the app from scratch?</p>
  
  <p>I've never submitted an app to the Store yet, I need some guidelines about how to handle app updates if I need to make changes in database tables when having such database in an <code>.sqlite</code> file. I'm not using Core Data.</p>
  
  <p>Thanks</p>