Open bimajatiwijaya opened 6 years ago
if you go to java->com->"your package name" ->data -> OConstants you should see this just above DATABASE_VERSION var
- Database version. Required to change in increment order
- when you change your database model in case of released apk.
- When dealing with DATABASE_VERSION, you need to override onModelUpgrade() method
- in each of the model class for applying upgrade script for that model.
this is because database is created only on first app use to fix this problem you need to override onModelUpgrade method and run your upgrade script as stated in the quote above.
so when you add new field in one of your models you should change DATABASE_VERSION to +1 and then create your upgrade script and it should fix your problem.
@bimajatiwijaya Make sure your Instant run
option is turned off.
Error E/SQLiteLog: no such table [table_name] To solve this error i have to clear data and cache to make it run again. I think we should improve it.
LOG :
BaseModelProvider.java:92 BaseModelProvider.java:85 BaseModelProvider.java:108
Any clue why this happened and how to prevent this bug occurs ?