Bug or Feature Request: Got a data integrity crash after updating data model and database version
Description:
java.lang.IllegalStateException: ReActiveAndroid 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.
at com.reactiveandroid.internal.database.ReActiveOpenHelper.checkIdentity(ReActiveOpenHelper.java:71)
at com.reactiveandroid.internal.database.ReActiveOpenHelper.onOpen(ReActiveOpenHelper.java:51)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:411)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:298)
at com.reactiveandroid.internal.database.DatabaseInfo.getWritableDatabase(DatabaseInfo.java:65)
at com.reactiveandroid.ReActiveAndroid.getWritableDatabaseForTable(ReActiveAndroid.java:131)
at com.reactiveandroid.internal.utils.QueryUtils.execSQL(QueryUtils.java:27)
at com.reactiveandroid.query.ExecutableQueryBase.execute(ExecutableQueryBase.java:21)
I deleted a field from my model, and incremented the database version:
@Database(name = "propertyforce", version = 19)
public class AppDatabase {
It was 18 before. Here's how I'm initializing:
DatabaseConfig appDatabase = new DatabaseConfig.Builder(AppDatabase.class)
.addModelClasses(LogEntry.class, FarmReport.class, FarmReportProperty.class)
.disableMigrationsChecking() // Potentially destructive, so replace with migrations if adding any tables that need to persist
.addTypeSerializers(JsonSerializer.class)
.build();
ReActiveAndroid.init(new ReActiveConfig.Builder(context)
.addDatabaseConfigs(appDatabase)
.build());
So I shouldn't need any migrations. Why is this happening?
ReActiveAndroid Version: 1.4.3
Bug or Feature Request: Got a data integrity crash after updating data model and database version
Description:
I deleted a field from my model, and incremented the database version:
It was 18 before. Here's how I'm initializing:
So I shouldn't need any migrations. Why is this happening?