@Test(expected = SQLiteException.class) public void onDowngrade() { mProvider.onDowngrade(mDatabase, 2, 1); }
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Can't downgrade database from version " + oldVersion + " to " + newVersion); }
SimpleSQLHelper extends SQLiteOpenHelper { @Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Can't downgrade database from version " + oldVersion + " to " + newVersion); } }
SimpleSQLHelper extends SQLiteOpenHelper { @Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Can't downgrade database from version " + oldVersion + " to " + newVersion); } SimpleSQLHelper(Context context, String fileName, int schemaVersion); }
SimpleSQLHelper extends SQLiteOpenHelper { @Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Can't downgrade database from version " + oldVersion + " to " + newVersion); } SimpleSQLHelper(Context context, String fileName, int schemaVersion); void setTableClass(Class<?> tableClass); @Override void onCreate(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); @Override void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion); }
SimpleSQLHelper extends SQLiteOpenHelper { @Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Can't downgrade database from version " + oldVersion + " to " + newVersion); } SimpleSQLHelper(Context context, String fileName, int schemaVersion); void setTableClass(Class<?> tableClass); @Override void onCreate(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); @Override void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion);  }