Allow hiding answers

This commit is contained in:
M66B
2019-04-20 10:35:30 +02:00
parent 8cacc15a37
commit a1c740676e
11 changed files with 1745 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 70,
version = 71,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -738,6 +738,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("UPDATE message SET uid = NULL WHERE uid < 0");
}
})
.addMigrations(new Migration(70, 71) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `answer` ADD COLUMN `hide` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}