
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 0.67 KB | hits: 11 | expires: Never
Does creating a table after the database has already been created change the database version in SQLite?
private static class DbWordsHelper extends SQLiteOpenHelper {
private DbWordsHelper(Context context) {
super(context, DB_NAME, null, DB_VERSION);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// Here in the future should be method that change the schema of the
// database. Now we just delete
try {
db.execSQL(DROP_TABLE_WORDS);
} catch (SQLException e) {
Log.e(TAG, "Error while updating database" + TABLE_WORDS, e);
}
onCreate(db);
}