Our app has DB version 14 and uses the android sqllite helpers. Now we are moving to use the room db and migrating all the DB stuff to room. we have defined all the migrations from 1_2, 2_3 .. to 13_14 and give all these int the build
.databaseBuilder( app, Database::class.java, "my.db" ).addMigrations(arrayOf( MIGRATION_1_2, MIGRATION_2_3, ..... MIGRATION_10_11, MIGRATION_11_12, MIGRATION_12_13, MIGRATION_13_14 )) .build()
Is this right way of doing. If i have the non room version of the app installed with DB version 14 and i try to update it to room version of the app with same db version 14, I am getting the error :
java.lang.IllegalStateException: Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number. You can simply fix this by increasing the version number.