Roadmap/Consideration to keep old data after type migration
Is there any roadmap or consideration to keep old data while doing type-migration?
Describe the solution you'd like
Would be nice to keep old data while doing type-migration. Say @Entity has a long field that should be migrated to int. There could be two solutions:
- Automatic migration, if types are not convertible choose the default value provided
- Let the developer do data migration
Describe alternatives you've considered
Currently, there is no alternative because data migration is internal to ObjectBox and developers don't have the flexibility to handle data migration after type-migration
Just keep the "old" property around and add a new one. Then add some logic that checks the old and new properties before returning an actual value to calling code.
Leaving this open for automatic type migration.