Added folder setting to enable/disable notifications

This commit is contained in:
M66B
2018-12-09 09:38:23 +01:00
parent 0fd7f670d2
commit 4a42c7764e
15 changed files with 1319 additions and 14 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 = 19,
version = 20,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -276,6 +276,14 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `identity` ADD COLUMN `read_receipt` INTEGER NOT NULL DEFAULT 0");
}
})
.addMigrations(new Migration(19, 20) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `notify` INTEGER NOT NULL DEFAULT 0");
db.execSQL("UPDATE `folder` SET notify = unified");
}
})
.build();
}