From: Damyan Ivanov Date: Thu, 6 May 2021 06:57:07 +0000 (+0300) Subject: fix migration off options table for current profile X-Git-Tag: v0.18.0 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=97fb6ae61fcfd39435bc3280ac6f9319f7f6cb10;p=mobile-ledger.git fix migration off options table for current profile --- diff --git a/app/src/main/java/net/ktnx/mobileledger/db/DB.java b/app/src/main/java/net/ktnx/mobileledger/db/DB.java index 9819d23f..3a236944 100644 --- a/app/src/main/java/net/ktnx/mobileledger/db/DB.java +++ b/app/src/main/java/net/ktnx/mobileledger/db/DB.java @@ -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()) {