Added folder poll factor

This commit is contained in:
M66B
2020-02-25 21:06:17 +01:00
parent d014f18d20
commit 5b992b3166
8 changed files with 2263 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 144,
version = 145,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -1386,6 +1386,14 @@ public abstract class DB extends RoomDatabase {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `inferiors` INTEGER NOT NULL DEFAULT 1");
}
})
.addMigrations(new Migration(144, 145) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `poll_factor` INTEGER NOT NULL DEFAULT 1");
db.execSQL("ALTER TABLE `folder` ADD COLUMN `poll_count` INTEGER NOT NULL DEFAULT 0");
}
});
}