Closed santieduardo closed 2 years ago
oldObject
are objects from the old realm and are read only. newObject
are objects from the new realm and are read/write. Ultimately the objects you want to delete will be in newObject
. You may need to split this logic into two migration.enumerateObject
blocks. You'd delete any newObjects
in the second block.
Thank you very much for your help!
How frequently does the bug occur?
All the time
Description
I am trying to migrate a "table" that the
id
column is not a Primary Key and it has some duplicate registers.So, I have created a migration to add
id
column as Primary Key and delete the duplicate registers. But I have a crash when I try to delete deoldObject
.Here my code:
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.15.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 14, 15
Build environment
Xcode version: 13.4 (13F17a) Dependency manager and version: CocoaPods 1.11.3