How to clear old app data for a update?


#1

Hi all, I see some clear history and clear cache tutorials on the forum, but is there possible to clear app data for an app?
Because I made a huge change in my database, but the updated app still shows the old database.

Thanks in advanced.


#2

Same problem. I am working with sqlite database, I’ve to uninstall the app to get the database updated.


#3

I found that I can just change the name of that database, so that CordovaSqlite will copy and use that new database.


#4

It’s an idea. But maybe consume too much device storage space for old database.


#5

delete the old database using the cordova sqlite plugin code.

window.sqlitePlugin.deleteDatabase({name: "my.db", location: 1}, successcb, errorcb);

then create the new database with the pre bundled code in your update.


#6

Thanks a lot. @gaurav_ch