Added account option to individually notify new messages

This commit is contained in:
M66B
2018-11-24 09:26:34 +01:00
parent 21f148955e
commit 7e9ab05aff
10 changed files with 1204 additions and 43 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 = 5,
version = 6,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -155,6 +155,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `message` ADD COLUMN `last_attempt` INTEGER");
}
})
.addMigrations(new Migration(5, 6) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `notify` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}