Handle removal of Kotlin data class's field on app's update without loosing its value
I want to modify existing data class, by moving one of its parameters into second data class and I wonder what's the best way to handle it, without loosing the data already stored using the old data class. Data is stored using Json serializer and app has mechanisms for updating data stored in databases on app's update.
Here's example:
Currently used data class
@Serializable
@Parcelize
data class AlarmInfo (
val volume: Int
(...)//other fields
) : Parcelable
Data classes to be used...