updating an sqlite table

  • Replies:1
Suresh Kumar
  • Forum posts: 9

Jan 6, 2019, 7:06:44 AM via Website

I have an android app using an sqlite table. I need to add one more column to the table. I understand that it can be done in the onUpgrade method of DatabaseHelper class. My question is when is onUpgrade called? If i uinstall the app from my phone and reinstall then will the existing data be deleted?
Also is there any tool in Android Studio where I can see the exiting data in database?

James Watson
  • Forum posts: 1,584

Jan 6, 2019, 3:47:18 PM via Website

I used a firefox add-on to view and edit data in a sqlite database.
In general, your own db data after app installing will be deleted after you reinstall an app unless there are some special codes in the app to save and reload db data when uninstalling and installing.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.