I changed an enum value from this:
enum Kind: String, Codable, CaseIterable {
case credit
}
to this:
enum Kind: String, Codable, CaseIterable {
case credit = "Credit"
}
And now it fails to load the data. This is inside of a SwiftData model. I get why the error is occurring, but is there a way to resolve this issue without having to revert back or delete the data?
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Cannot initialize Kind from invalid String value credit", underlyingError: nil))