Use message headers hash to identify messages

This commit is contained in:
M66B
2020-04-01 10:42:37 +02:00
parent 4004f07e08
commit 7f2ea40ace
6 changed files with 2239 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 151,
version = 152,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -1436,6 +1436,13 @@ public abstract class DB extends RoomDatabase {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `keep_alive_succeeded` INTEGER NOT NULL DEFAULT 0");
}
})
.addMigrations(new Migration(151, 152) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `message` ADD COLUMN `hash` TEXT");
}
});
}