Added on demand sync setting

This commit is contained in:
M66B
2019-12-08 15:00:15 +01:00
parent 4c68973238
commit e85beb1b04
8 changed files with 2036 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 120,
version = 121,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -1169,6 +1169,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `certificate` ADD COLUMN `before` INTEGER");
}
})
.addMigrations(new Migration(120, 121) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("UPDATE `account` SET ondemand = 0");
}
})
.build();
}