Disable poll for non synchronizing user folders

This commit is contained in:
M66B
2020-04-23 11:28:16 +02:00
parent eafdaee090
commit 7ce73427e3
3 changed files with 2234 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 154,
version = 155,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -1545,6 +1545,13 @@ public abstract class DB extends RoomDatabase {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `identity` ADD COLUMN `ehlo` TEXT");
}
})
.addMigrations(new Migration(154, 155) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("UPDATE `folder` SET `poll` = 1 WHERE `synchronize` = 0");
}
});
}