mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 17:11:12 +01:00
Add index to message.ui_seen
This commit is contained in:
@@ -40,7 +40,7 @@ import android.util.Log;
|
||||
EntityAttachment.class,
|
||||
EntityOperation.class
|
||||
},
|
||||
version = 3,
|
||||
version = 4,
|
||||
exportSchema = true
|
||||
)
|
||||
|
||||
@@ -76,6 +76,7 @@ public abstract class DB extends RoomDatabase {
|
||||
return builder
|
||||
.addMigrations(MIGRATION_1_2)
|
||||
.addMigrations(MIGRATION_2_3)
|
||||
.addMigrations(MIGRATION_3_4)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -103,6 +104,14 @@ public abstract class DB extends RoomDatabase {
|
||||
}
|
||||
};
|
||||
|
||||
private static final Migration MIGRATION_3_4 = new Migration(3, 4) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase db) {
|
||||
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("CREATE INDEX `index_message_ui_seen` ON `message` (`ui_seen`)");
|
||||
}
|
||||
};
|
||||
|
||||
public static class Converters {
|
||||
@TypeConverter
|
||||
public static byte[] fromString(String value) {
|
||||
|
||||
Reference in New Issue
Block a user