Added option for signatures

Fixes #58
This commit is contained in:
M66B
2018-09-07 08:44:48 +00:00
parent 5382b0c022
commit f5e67369ee
9 changed files with 1017 additions and 20 deletions

View File

@@ -45,7 +45,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 10,
version = 11,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -184,6 +184,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("UPDATE `folder` SET unified = 1 WHERE type = '" + EntityFolder.INBOX + "'");
}
})
.addMigrations(new Migration(10, 11) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `signature` TEXT");
}
})
.build();
}