From 3d138f6852a18bf7d6e53c376be90ab23757df4d Mon Sep 17 00:00:00 2001 From: Ermat Date: Mon, 23 Oct 2023 11:51:47 +0600 Subject: [PATCH] Fix databse migrations related to `EnabledWallet` --- .../UnstoppableWallet/Core/Storage/StorageMigrator.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Storage/StorageMigrator.swift b/UnstoppableWallet/UnstoppableWallet/Core/Storage/StorageMigrator.swift index b35bd20bdf..58cadd6cfa 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Storage/StorageMigrator.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Storage/StorageMigrator.swift @@ -658,8 +658,9 @@ class StorageMigrator { } for old in oldWallets { - let record = EnabledWallet( + let record = EnabledWallet_v_0_34( tokenQueryId: tokenQuery(coinTypeId: old.coinId).id, + coinSettingsId: old.coinSettingsId, accountId: old.accountId, coinName: old.coinName, coinCode: old.coinCode, @@ -780,7 +781,7 @@ class StorageMigrator { t.column(EnabledWalletCache.Columns.accountId.name, .text).notNull() t.column(EnabledWalletCache.Columns.balances.name, .text).notNull() - t.primaryKey([EnabledWalletCache.Columns.tokenQueryId.name, EnabledWalletCache_v_0_36.Columns.accountId.name], onConflict: .replace) + t.primaryKey([EnabledWalletCache.Columns.tokenQueryId.name, EnabledWalletCache.Columns.accountId.name], onConflict: .replace) } }