Discard old profiles once migrated (#884)
Otherwise, they would reappear if the migrated profiles are deleted from the new store.
This commit is contained in:
parent
d3e344670b
commit
22e8e659e4
|
@ -190,6 +190,12 @@ private extension MigrateView {
|
||||||
model.statuses[$0.id] == .done
|
model.statuses[$0.id] == .done
|
||||||
}
|
}
|
||||||
pp_log(.App.migration, .notice, "Migrated \(migrated.count) profiles")
|
pp_log(.App.migration, .notice, "Migrated \(migrated.count) profiles")
|
||||||
|
do {
|
||||||
|
try await migrationManager.deleteMigratableProfiles(withIds: Set(migrated.map(\.id)))
|
||||||
|
pp_log(.App.migration, .notice, "Discarded \(migrated.count) migrated profiles from old store")
|
||||||
|
} catch {
|
||||||
|
pp_log(.App.migration, .error, "Unable to discard migrated profiles: \(error)")
|
||||||
|
}
|
||||||
model.step = .migrated(migrated)
|
model.step = .migrated(migrated)
|
||||||
} catch {
|
} catch {
|
||||||
pp_log(.App.migration, .error, "Unable to migrate profiles: \(error)")
|
pp_log(.App.migration, .error, "Unable to migrate profiles: \(error)")
|
||||||
|
|
Loading…
Reference in New Issue