mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 23:50:58 +01:00
Identity colors
This commit is contained in:
@@ -46,7 +46,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
|
||||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 26,
|
||||
version = 27,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
@@ -307,6 +307,14 @@ public abstract class DB extends RoomDatabase {
|
||||
db.execSQL("ALTER TABLE `message` ADD COLUMN `extra` TEXT");
|
||||
}
|
||||
})
|
||||
.addMigrations(new Migration(26, 27) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase db) {
|
||||
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("ALTER TABLE `identity` ADD COLUMN `color` INTEGER");
|
||||
db.execSQL("CREATE INDEX `index_identity_account_email` ON `identity` (`account`, `email`)");
|
||||
}
|
||||
})
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user