Which of the following is the correct syntax of onUpgrade method in SQLite database?
public void onUpgrade(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); }
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); }
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.insert(); }
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.close(); }
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.delete(); }