Added advanced account option for summary only notifications

This commit is contained in:
M66B
2023-04-11 08:36:48 +02:00
parent 18dc1b6f93
commit 9d716427ba
15 changed files with 3094 additions and 22 deletions

View File

@@ -68,7 +68,7 @@ import javax.mail.internet.InternetAddress;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 278,
version = 279,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -2297,8 +2297,8 @@ public abstract class DB extends RoomDatabase {
logMigration(startVersion, endVersion);
db.execSQL("CREATE INDEX `index_account_synchronize` ON `account` (`synchronize`)");
db.execSQL("CREATE INDEX `index_account_category` ON `account` (`category`)");
db.execSQL("DROP VIEW IF EXISTS `account_view`");
db.execSQL("CREATE VIEW IF NOT EXISTS `account_view` AS " + TupleAccountView.query);
//db.execSQL("DROP VIEW IF EXISTS `account_view`");
//db.execSQL("CREATE VIEW IF NOT EXISTS `account_view` AS " + TupleAccountView.query);
}
}).addMigrations(new Migration(214, 215) {
@Override
@@ -2805,6 +2805,14 @@ public abstract class DB extends RoomDatabase {
logMigration(startVersion, endVersion);
db.execSQL("ALTER TABLE `rule` ADD COLUMN `group` TEXT");
}
}).addMigrations(new Migration(278, 279) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
logMigration(startVersion, endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `summary` INTEGER NOT NULL DEFAULT 0");
db.execSQL("DROP VIEW IF EXISTS `account_view`");
db.execSQL("CREATE VIEW IF NOT EXISTS `account_view` AS " + TupleAccountView.query);
}
}).addMigrations(new Migration(998, 999) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {