Added folder levels

This commit is contained in:
M66B
2018-12-03 10:39:44 +01:00
parent c1a52e91bb
commit 7483b45905
7 changed files with 1241 additions and 19 deletions

View File

@@ -46,7 +46,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 13,
version = 14,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -227,6 +227,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("CREATE INDEX `index_message_ui_flagged` ON `message` (`ui_flagged`)");
}
})
.addMigrations(new Migration(13, 14) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `level` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}