wallet DB version

This commit is contained in:
Florian Dold 2020-05-08 17:45:23 +05:30
parent 76e664c943
commit 4bd372770e
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -1,13 +1,20 @@
import { Stores } from "./types/dbTypes"; import { Stores } from "./types/dbTypes";
import { openDatabase, Database, Store, Index } from "./util/query"; 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 * Current database minor version, should be incremented
* each time we do incompatible schema changes on the database. * each time we do minor schema changes on the database.
* In the future we might consider adding migration functions for * A change is considered minor when fields are added in a
* each version increment. * backwards-compatible way or object stores and indices
* are added.
*/ */
export const WALLET_DB_VERSION = 1; export const WALLET_DB_VERSION = 1;