Added snoozing messages

This commit is contained in:
M66B
2019-01-07 15:05:24 +00:00
parent 0bcb335203
commit e3e0f58197
17 changed files with 1622 additions and 20 deletions

View File

@@ -49,7 +49,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 31,
version = 32,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -396,6 +396,14 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `attachment` ADD COLUMN `disposition` TEXT");
}
})
.addMigrations(new Migration(31, 32) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `message` ADD COLUMN `ui_snoozed` INTEGER");
db.execSQL("CREATE INDEX `index_message_ui_snoozed` ON `message` (`ui_snoozed`)");
}
})
.build();
}