From: Damyan Ivanov Date: Thu, 6 Dec 2018 21:29:31 +0000 (+0000) Subject: table for storing account balance X-Git-Tag: v0.3~314 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=ad7a4f94232a714a8edde8dff1c300e59be95a46;p=mobile-ledger.git table for storing account balance --- 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) {