Download small messages on metered connection only, refactoring, improvements

This commit is contained in:
M66B
2018-09-16 10:44:13 +00:00
parent 5d07791b99
commit 265e7fe88f
17 changed files with 173 additions and 111 deletions

View File

@@ -225,7 +225,8 @@ public abstract class DB extends RoomDatabase {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `message` ADD COLUMN `downloaded` INTEGER NOT NULL DEFAULT 1");
db.execSQL("ALTER TABLE `message` ADD COLUMN `size` INTEGER");
db.execSQL("ALTER TABLE `message` ADD COLUMN `content` INTEGER NOT NULL DEFAULT 1");
}
})
.build();