From 97b60d937d63fd34a7cdd29f07ed81da47f95208 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Mon, 16 Nov 2015 17:38:12 +1100 Subject: [PATCH] CR: Apply database changes in chronological order. As with the previous commit, there is probably not any harm doing this in the way it was done. However it helps reason about the code if changes are applied in the order that they were introduced. Especially because each of them does something depending on the version of the database at that point. With this change, you always know that at the point that the function is run, the database version will be 51 (and hence the structure of the database will be predictable). --- F-Droid/src/org/fdroid/fdroid/data/DBHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/F-Droid/src/org/fdroid/fdroid/data/DBHelper.java b/F-Droid/src/org/fdroid/fdroid/data/DBHelper.java index dc8f717e3..1173517a9 100644 --- a/F-Droid/src/org/fdroid/fdroid/data/DBHelper.java +++ b/F-Droid/src/org/fdroid/fdroid/data/DBHelper.java @@ -283,11 +283,11 @@ public class DBHelper extends SQLiteOpenHelper { populateRepoNames(db, oldVersion); if (oldVersion < 43) createInstalledApp(db); addIsSwapToRepo(db, oldVersion); - addCredentialsToRepo(db, oldVersion); addChangelogToApp(db, oldVersion); addIconUrlLargeToApp(db, oldVersion); updateIconUrlLarge(db, oldVersion); recreateInstalledCache(db, oldVersion); + addCredentialsToRepo(db, oldVersion); } /**