Closed joreilly closed 6 months ago
ahh good catch, I'll validate it is not necessary and remove.
Actually, yes, these should be version controlled. See: https://developer.android.com/training/data-storage/room/migrating-db-versions#export-schemas
ohh is it, json is regenerated when I rebuild the project?
It's generated when the project is built, but its contents would change over time if you change the database schema and bump its version. The 1.json
, 2.json
, etc. files are supposed to contain the various schemas used over time (for testing migrations and such). Not important for a small sample of course, as you can just always do fully destructive migrations, but in general they should be in version control.
ok, I removed the json file but I will be adding it back with the next update.
Very minor thing but wondering if https://github.com/android/kotlin-multiplatform-samples/blob/main/Fruitties/shared/schemas/com.example.fruitties.database.AppDatabase/1.json should be included in github repo given that it's generated during build?