From ad7a4f94232a714a8edde8dff1c300e59be95a46 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 6 Dec 2018 21:29:31 +0000 Subject: [PATCH] table for storing account balance --- app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java index 1f5801a7..7c2a8e2d 100644 --- a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java +++ b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java @@ -29,6 +29,9 @@ class MobileLedgerDB { db.execSQL("create index if not exists idx_accounts_name on accounts(name);"); db.execSQL("create table if not exists options(name varchar, value varchar);"); db.execSQL("create unique index if not exists idx_options_name on options(name);"); + db.execSQL("create table if not exists account_values(account varchar not null, currency varchar not null, value decimal(18,2) not null);"); + db.execSQL("create index if not exists idx_account_values_account on account_values(account);"); + db.execSQL("create unique index if not exists un_account_values on account_values(account,currency);"); } static void applyRevisions(Resources rm) { -- 2.39.5