Added setting to poll instead of synchronize

This commit is contained in:
M66B
2018-12-05 10:25:35 +01:00
parent 17bfeceb03
commit 3aa89cae97
9 changed files with 1405 additions and 170 deletions

View File

@@ -46,7 +46,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 15,
version = 16,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -241,6 +241,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `folder` ADD COLUMN `sync_state` TEXT");
}
})
.addMigrations(new Migration(15, 16) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `poll` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}