In my android application i have created the database which contains some data and it is on the app store.Now i need to change the database according to new requirement. when i update the apk file it wont create the new db again because it is already created.
How can i update the database which is already created on users device? How can i call the onUpgread() method of sqlite db? And is there any way to check it on emulator?
Please suggest.Thanks in advance.
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " +TABLE_NAME );
onCreate(db);
}