Let's say I have a model like this:
@Model
final class DataModel {
var firstProperty: String = ""
}
Later on I create a new property as such:
@Model
final class DataModel {
enum DataEnum {
case dataCase
}
var firstProperty: String = ""
var secondProperty: DataEnum? = .dataCase
}
My expectation is for the data that is already stored, the secondProperty
would be added with a default value of .dataCase
. However, it's being set to nil instead. I could have sworn it would set to the default value given to it. Has that changed, or has it always been this way? Does this require a migration plan?