From 96782cde816cddd5d75a82fe617ccabb9dc54c60 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 15 Apr 2021 18:39:34 +0000 Subject: [PATCH] dummy migration method it appeared useful at a point, but later the fix was another still, it may be handy in the future --- app/src/main/java/net/ktnx/mobileledger/db/DB.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ca2d9092..683d54b5 100644 --- a/app/src/main/java/net/ktnx/mobileledger/db/DB.java +++ b/app/src/main/java/net/ktnx/mobileledger/db/DB.java @@ -38,6 +38,7 @@ import net.ktnx.mobileledger.dao.ProfileDAO; import net.ktnx.mobileledger.dao.TemplateAccountDAO; import net.ktnx.mobileledger.dao.TemplateHeaderDAO; import net.ktnx.mobileledger.dao.TransactionDAO; +import net.ktnx.mobileledger.utils.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -120,6 +121,15 @@ abstract public class DB extends RoomDatabase { } }; } + private static Migration dummyVersionMigration(int toVersion) { + return new Migration(toVersion - 1, toVersion) { + @Override + public void migrate(@NonNull SupportSQLiteDatabase db) { + Logger.debug("db", + String.format(Locale.ROOT, "Dummy DB migration to version %d", toVersion)); + } + }; + } private static Migration multiVersionMigration(int fromVersion, int toVersion) { return new Migration(fromVersion, toVersion) { @Override -- 2.39.5