mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
fix addArchiveConversations migration method
this will set NOT NULL and DEFAULT 0 to hasArchived column Otherwise there would be an error when updating from the previous DB version: IllegalStateException: Migration didn't properly handle: Conversations(com.nextcloud.talk.data.database.model.ConversationEntity) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
4ff9b2b3c6
commit
11a4738a4c
@ -250,7 +250,7 @@ object Migrations {
|
|||||||
try {
|
try {
|
||||||
db.execSQL(
|
db.execSQL(
|
||||||
"ALTER TABLE Conversations " +
|
"ALTER TABLE Conversations " +
|
||||||
"ADD `hasArchived` INTEGER;"
|
"ADD COLUMN hasArchived INTEGER NOT NULL DEFAULT 0;"
|
||||||
)
|
)
|
||||||
} catch (e: SQLException) {
|
} catch (e: SQLException) {
|
||||||
Log.i("Migrations", "hasArchived already exists")
|
Log.i("Migrations", "hasArchived already exists")
|
||||||
|
Loading…
Reference in New Issue
Block a user