Added support for deleted flag

This commit is contained in:
M66B
2021-02-11 09:51:48 +01:00
parent 50686ce0c0
commit 54d806d3ed
9 changed files with 2449 additions and 23 deletions

View File

@@ -64,7 +64,7 @@ import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_PASSWORD;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 186,
version = 187,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -1823,6 +1823,14 @@ public abstract class DB extends RoomDatabase {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `message` ADD COLUMN `return_path` TEXT");
}
})
.addMigrations(new Migration(186, 187) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `message` ADD COLUMN `deleted` INTEGER NOT NULL DEFAULT 0");
db.execSQL("ALTER TABLE `message` ADD COLUMN `ui_deleted` INTEGER NOT NULL DEFAULT 0");
}
});
}