Added request delivery/read receipt to identity

This commit is contained in:
M66B
2018-12-07 16:48:52 +01:00
parent a59e665714
commit 3f2499698e
7 changed files with 1261 additions and 3 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 = 18,
version = 19,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -268,6 +268,14 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `folder` ADD COLUMN `tbd` INTEGER");
}
})
.addMigrations(new Migration(18, 19) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `identity` ADD COLUMN `delivery_receipt` INTEGER NOT NULL DEFAULT 0");
db.execSQL("ALTER TABLE `identity` ADD COLUMN `read_receipt` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}