Notify new messages after account creation only

This commit is contained in:
M66B
2018-11-06 16:45:52 +00:00
parent eb6203ab85
commit 5e9bb1415d
6 changed files with 1059 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 24,
version = 25,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -291,6 +291,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `message` ADD COLUMN `preview` TEXT");
}
})
.addMigrations(new Migration(24, 25) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `created` INTEGER");
}
})
.build();
}