SQLite Tutorial with onUpgrade method

Hello all, I am learning about sqlite in android app development. In this process, i figure out an onUpgrade method. This method seems little complex to understand for me. Kindly share your knowledge or link to useful tutorial for it. Thanks in advance.

28th Jun 2018, 3:02 PM
Jen Dust
1 Answer
+ 2
onUpgrade method is called when you increase the database version number. Thistutorial https://demonuts.com/sqlite-android/ guides on this topic. Now question arise, when the database version is upgraded? Version is updated when following things occurs 1. When you add, update or delete any column of any table in the whole database. 2. If you update any column name of any table. 3. After you add, update or delete any table. 4. Update the table name and increase DATABASE_VERSION.
28th Jun 2018, 3:07 PM
John Simpson