]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix migration off options table for current profile v0.18.0
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 May 2021 06:57:07 +0000 (09:57 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 May 2021 06:57:53 +0000 (09:57 +0300)
app/src/main/java/net/ktnx/mobileledger/db/DB.java

index 9819d23f7f135159c901528e0003ea87d0da01c7..3a236944e8969e3c3244acf869faee0035fafbcc 100644 (file)
@@ -108,8 +108,8 @@ abstract public class DB extends RoomDatabase {
                 // SharedPreferences
                 if (toVersion == 59) {
                     try (Cursor c = db.query(
-                            "SELECT p.id, p.theme_hue FROM profiles p WHERE p.id=(SELECT o.value " +
-                            "FROM options WHERE o.profile_uid IS NULL AND o.name=?",
+                            "SELECT p.id, p.theme FROM profiles p WHERE p.id=(SELECT o.value " +
+                            "FROM options o WHERE o.profile_id=0 AND o.name=?)",
                             new Object[]{"profile_id"}))
                     {
                         if (c.moveToFirst()) {