In my app I've got a short routine in the Starter.Service_Create sub that initialises the SQLite database my app uses. It checks for a file's existence and if it isn't in DirInternal it copies it in from DirAssets.
I'm having a problem with it however when I create a release version of the app.
If a release version of the app has been installed on a device and opened (therefore creating a copy of the db in DirInternal) even if the app has been completely uninstalled when it's installed again it's not copying over a new version of the db. I presume what's happening is that an uninstall isn't wiping the DirInternal folder for the app and a reinstall just detects the file is already there.
The problem that gives me is if I make structural changes to the database and then push out an update via Google Play it won't overwrite the users existing DirInternal. I'm having to create a new db on DirInternal for each update, presumably leaving loads of orphaned db's sitting in there. I kind of get that on just an app update, but I'm surprised on an uninstall and reinstall it happens.
Is there any kind of correct procedure I should be following, or some technique I don't know about?
I'm having a problem with it however when I create a release version of the app.
If a release version of the app has been installed on a device and opened (therefore creating a copy of the db in DirInternal) even if the app has been completely uninstalled when it's installed again it's not copying over a new version of the db. I presume what's happening is that an uninstall isn't wiping the DirInternal folder for the app and a reinstall just detects the file is already there.
The problem that gives me is if I make structural changes to the database and then push out an update via Google Play it won't overwrite the users existing DirInternal. I'm having to create a new db on DirInternal for each update, presumably leaving loads of orphaned db's sitting in there. I kind of get that on just an app update, but I'm surprised on an uninstall and reinstall it happens.
Is there any kind of correct procedure I should be following, or some technique I don't know about?