[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: properly migrate
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: properly migrate new index |
Date: |
Tue, 23 Jan 2024 09:38:52 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 9811da5a8 wallet-core: properly migrate new index
9811da5a8 is described below
commit 9811da5a8063e750acce65190db2466723b581fa
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Jan 23 09:38:48 2024 +0100
wallet-core: properly migrate new index
---
packages/idb-bridge/src/SqliteBackend.ts | 5 +++++
packages/taler-wallet-core/src/db.ts | 17 ++++++++++-------
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/packages/idb-bridge/src/SqliteBackend.ts
b/packages/idb-bridge/src/SqliteBackend.ts
index a25ec0045..26ed43b0f 100644
--- a/packages/idb-bridge/src/SqliteBackend.ts
+++ b/packages/idb-bridge/src/SqliteBackend.ts
@@ -992,6 +992,11 @@ export class SqliteBackend implements Backend {
object_store_id: objectStoreId,
name: indexName,
});
+ if (!idxInfo) {
+ throw Error(
+ `index ${indexName} on object store ${objectStoreName} not found`,
+ );
+ }
const indexUnique = expectDbNumber(idxInfo, "unique_index");
const indexMultiEntry = expectDbNumber(idxInfo, "multientry");
const indexKeyPath = deserializeKeyPath(
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,
},
),
},
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: properly migrate new index,
gnunet <=