Properly drop table on update

git-svn-id: https://zxing.googlecode.com/svn/trunk@1078 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-10-20 16:57:21 +00:00
parent 4bd0064326
commit f4940b5782

View file

@ -52,7 +52,7 @@ final class DBHelper extends SQLiteOpenHelper {
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) {
sqLiteDatabase.delete(TABLE_NAME, null, null);
sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
onCreate(sqLiteDatabase);
}