Show inline images

Resf #49
This commit is contained in:
M66B
2018-09-13 17:03:28 +00:00
parent cdb745d0b7
commit fd65310f22
8 changed files with 1016 additions and 6 deletions

View File

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