From: Damyan Ivanov Date: Sat, 15 Dec 2018 19:37:00 +0000 (+0000) Subject: also empty transaction_amounts upon re-load X-Git-Tag: v0.3~224 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=f9d1b2230011184063de95b9f7ee7cb0b103b0ee;p=mobile-ledger.git also empty transaction_amounts upon re-load the foreign key constraint is not declared as ON DELETE CASCADE :( --- 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;