Added folder setting to disable automatically downloading of message texts and attachments

This commit is contained in:
M66B
2018-12-14 12:31:25 +01:00
parent ae9d35c084
commit e49d09ab9c
8 changed files with 1347 additions and 76 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 = 22,
version = 23,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -300,6 +300,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("UPDATE `folder` SET sync_days = 1");
}
})
.addMigrations(new Migration(22, 23) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `download` INTEGER NOT NULL DEFAULT 1");
}
})
.build();
}