Reputation: 51
I was just wondering if you really need to increment the room database version number if you changed only the Data Access Objects (DAO's).
So the scenario is:
Do I need to increment the room database version number?
Upvotes: 4
Views: 1770
Reputation: 1007276
Do I need to increment the room database version number?
You need to increment the schema version when you change the schema. Simply adding functions to a DAO should not result in a schema change. However, your schema might change by things beyond your DAO and your entities. Right now, I think only @DatabaseView
would have that effect in terms of annotations, and I do not see anything in RoomDatabase.Builder
that should have an effect (other than addMigrations()
, which specifically is for version number changes).
Upvotes: 6