From dd088f35ddfc7460cb223ae45b009a895318af73 Mon Sep 17 00:00:00 2001 From: Krypto Pank Date: Tue, 10 May 2022 10:35:08 +0300 Subject: [PATCH] Fix crash when migrate bookmarks #4563 --- AlphaWallet/Core/Initializers/DatabaseMigration.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AlphaWallet/Core/Initializers/DatabaseMigration.swift b/AlphaWallet/Core/Initializers/DatabaseMigration.swift index d74bfb3e8..533886543 100644 --- a/AlphaWallet/Core/Initializers/DatabaseMigration.swift +++ b/AlphaWallet/Core/Initializers/DatabaseMigration.swift @@ -155,10 +155,10 @@ extension DatabaseMigration { try? realm.write { for each in oldPerWalletDatabase.objects(History.self) { - realm.create(History.self, value: each) + realm.create(History.self, value: each, update: .all) } for each in oldPerWalletDatabase.objects(Bookmark.self) { - realm.create(Bookmark.self, value: each) + realm.create(Bookmark.self, value: each, update: .all) } } }