diff options
author | Florian Dold <florian@dold.me> | 2024-01-23 09:38:48 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-23 09:38:48 +0100 |
commit | 9811da5a8063e750acce65190db2466723b581fa (patch) | |
tree | e4139f59b4cd2237e320b4032d29c7c6789f821e /packages/taler-wallet-core/src/db.ts | |
parent | 6a4675267e00a5fd0eeb9b949e156510fc491602 (diff) | |
download | wallet-core-9811da5a8063e750acce65190db2466723b581fa.tar.xz |
wallet-core: properly migrate new index
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 149d73abc..a0613fd39 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -31,7 +31,6 @@ import { AbsoluteTime, AgeCommitmentProof, AmountJson, - AmountLike, AmountString, Amounts, AttentionInfo, @@ -152,7 +151,7 @@ export const CURRENT_DB_CONFIG_KEY = "currentMainDbName"; * backwards-compatible way or object stores and indices * are added. */ -export const WALLET_DB_MINOR_VERSION = 3; +export const WALLET_DB_MINOR_VERSION = 4; declare const symDbProtocolTimestamp: unique symbol; @@ -2332,11 +2331,14 @@ export const WalletStoresV1 = { autoIncrement: true, versionAdded: 3, indexes: { - byCurrencyAndUrlAndPub: describeIndex("byCurrencyAndUrlAndPub", [ - "currency", - "auditorBaseUrl", - "auditorPub", - ]), + byCurrencyAndUrlAndPub: describeIndex( + "byCurrencyAndUrlAndPub", + ["currency", "auditorBaseUrl", "auditorPub"], + { + unique: true, + versionAdded: 4, + }, + ), }, }), globalCurrencyExchanges: describeStoreV2({ @@ -2351,6 +2353,7 @@ export const WalletStoresV1 = { ["currency", "exchangeBaseUrl", "exchangeMasterPub"], { unique: true, + versionAdded: 4, }, ), }, |