diff options
author | George Mount <mount@google.com> | 2013-03-18 10:05:55 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2013-03-18 10:14:20 -0700 |
commit | a248e314296419fb96e48a900e742226240357ab (patch) | |
tree | ccdb3fb8ba31f5ed48532b80c68a047e16b7e3c3 /src/com/android/photos | |
parent | 4230534827415a30840e122347354ea0be95a701 (diff) | |
download | android_packages_apps_Snap-a248e314296419fb96e48a900e742226240357ab.tar.gz android_packages_apps_Snap-a248e314296419fb96e48a900e742226240357ab.tar.bz2 android_packages_apps_Snap-a248e314296419fb96e48a900e742226240357ab.zip |
Fix "drop table" problem.
Bug 8404285
Should drop table if exists when upgrading, not just drop a table.
Change-Id: Ic75fa0efc6ab44be073b2b78a8520e2289cd3148
Diffstat (limited to 'src/com/android/photos')
-rw-r--r-- | src/com/android/photos/data/PhotoDatabase.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/photos/data/PhotoDatabase.java b/src/com/android/photos/data/PhotoDatabase.java index 3a9ad3cb1..f0aa4b6d4 100644 --- a/src/com/android/photos/data/PhotoDatabase.java +++ b/src/com/android/photos/data/PhotoDatabase.java @@ -176,7 +176,7 @@ public class PhotoDatabase extends SQLiteOpenHelper { protected static void dropTable(SQLiteDatabase db, String table) { db.beginTransaction(); try { - db.execSQL("drop table " + table); + db.execSQL("drop table if exists " + table); db.setTransactionSuccessful(); } finally { db.endTransaction(); |