]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/utils/MobileLedgerDatabase.java
cascade delete of template_accounts from templates
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / utils / MobileLedgerDatabase.java
index 29f4142571e4974eb5d35577ef579c995296014d..0a9a509ba6556b012fdd9810d2a9ed8aa162f27a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2020 Damyan Ivanov.
+ * Copyright © 2021 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -38,8 +38,8 @@ import static net.ktnx.mobileledger.utils.Logger.debug;
 
 public class MobileLedgerDatabase extends SQLiteOpenHelper {
     public static final MutableLiveData<Boolean> initComplete = new MutableLiveData<>(false);
-    private static final String DB_NAME = "MoLe.db";
-    private static final int LATEST_REVISION = 40;
+    public static final String DB_NAME = "MoLe.db";
+    private static final int LATEST_REVISION = 55;
     private static final String CREATE_DB_SQL = "create_db";
     private final Application mContext;
 
@@ -72,6 +72,9 @@ public class MobileLedgerDatabase extends SQLiteOpenHelper {
             applyRevision(db, i);
     }
     private void applyRevision(SQLiteDatabase db, int rev_no) {
+        if (rev_no == 55)
+            return;
+
         String rev_file = String.format(Locale.US, "sql_%d", rev_no);
 
         applyRevisionFile(db, rev_file);