If you just want to add a new table, comment out the DROP TABLE commands in your onUpgrade() method. You have full control over the code in onUpgrade() , so it could just be:
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("CREATE TABLE ..."); }
Technically, you donβt even need to increase the version of the database, at any time when you have access to a copy of db , you can execute the CREATE statement.
Sam
source share