From f9d1b2230011184063de95b9f7ee7cb0b103b0ee Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 15 Dec 2018 19:37:00 +0000 Subject: [PATCH] also empty transaction_amounts upon re-load the foreign key constraint is not declared as ON DELETE CASCADE :( --- .../net/ktnx/mobileledger/async/RetrieveTransactionsTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java index 2e3ca764..9029c210 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -103,6 +103,7 @@ public class RetrieveTransactionsTask extends try { String root = params[0].getAccountsRoot(); db.execSQL("DELETE FROM transactions;"); + db.execSQL("DELETE FROM transaction_accounts"); int state = ParserState.EXPECTING_JOURNAL; String line; -- 2.39.5