]> git.ktnx.net Git - mobile-ledger.git/commitdiff
also empty transaction_amounts upon re-load
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Dec 2018 19:37:00 +0000 (19:37 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Dec 2018 19:37:00 +0000 (19:37 +0000)
the foreign key constraint is not declared as ON DELETE CASCADE :(

app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java

index 2e3ca764d9897b1adecf718dd814d2e7b914ae8e..9029c210191f1c03e858319e3e7fb3b7418d5ce1 100644 (file)
@@ -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;