From 4e855b8132f94c2ff2617e22b715ce706acd0992 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Wed, 22 May 2013 21:30:02 +0100 Subject: [PATCH] Fix database upgrade bug --- src/org/fdroid/fdroid/DB.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index 4bf78d3fd..fe1498a3a 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -412,7 +412,6 @@ public class DB { @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { - resetTransient(db); // Migrate repo list to new structure. (No way to change primary // key in sqlite - table must be recreated) @@ -443,6 +442,11 @@ public class DB { } } + // The other tables are transient and can just be reset. Do this after + // the repo table changes though, because it also clears the lastetag + // fields which didn't always exist. + resetTransient(db); + } }