Updating app, pouchDB and webSQL

We’re nearing completion of an app and are thinking ahead in regards to preforming app updates. We’re using pouchDB synchronising with couchDB.

  1. What happens when an app is updated (manually or automatically), is it treated as paused or closed and reopened once updated?

  2. We want to make sure we can preserve local data (webSQL) and if required work with/update the data to fit in with any changes we may have made to the app during the update.

Does anyone have experience of this that could give us any pointers or let us know any gotchas?

We’re thinking something along the lines of checking the App version before syncing data each time, if the app version has changed then push up current data to couchdb where we can perform any changes required, then finally pull that back down to the updated app.

Thanks,
Ben