]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/MobileLedgerDB.java
table for storing account balance
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / MobileLedgerDB.java
index 1f5801a7018ffbb2a181b6c77bcc0bc82caa9a0f..7c2a8e2d83b6d726bcab4307a8dce3c22c9c5123 100644 (file)
@@ -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) {