summaryrefslogtreecommitdiff
path: root/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-05-08 17:45:23 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-05-08 17:45:23 +0530
commit4bd372770e331f95439acf68a024f6bc11914e78 (patch)
tree9e23eedff63b3943107748a7563a447252235a9a /src/db.ts
parent76e664c9432822c4f5ba717af7f421b7cd015bf3 (diff)
downloadwallet-core-4bd372770e331f95439acf68a024f6bc11914e78.tar.gz
wallet-core-4bd372770e331f95439acf68a024f6bc11914e78.tar.bz2
wallet-core-4bd372770e331f95439acf68a024f6bc11914e78.zip
wallet DB version
Diffstat (limited to 'src/db.ts')
-rw-r--r--src/db.ts17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/db.ts b/src/db.ts
index 18efbf2b0..ea20d2a06 100644
--- a/src/db.ts
+++ b/src/db.ts
@@ -1,13 +1,20 @@
import { Stores } from "./types/dbTypes";
import { openDatabase, Database, Store, Index } from "./util/query";
-const TALER_DB_NAME = "taler-wallet";
+/**
+ * Name of the Taler database. The name includes the
+ * major version of the DB schema. The version should be incremented
+ * with each major change. When incrementing the major version,
+ * the wallet should import data from the previous version.
+ */
+const TALER_DB_NAME = "taler-walletdb-v1";
/**
- * Current database version, should be incremented
- * each time we do incompatible schema changes on the database.
- * In the future we might consider adding migration functions for
- * each version increment.
+ * Current database minor version, should be incremented
+ * each time we do minor schema changes on the database.
+ * A change is considered minor when fields are added in a
+ * backwards-compatible way or object stores and indices
+ * are added.
*/
export const WALLET_DB_VERSION = 1;