From 9cc6ffc32ee95f36857fe1f9ec13325fa26ffa6a Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Sat, 1 Jan 2022 00:21:59 +0100 Subject: [PATCH] Add index during migration --- app/src/main/java/io/heckel/ntfy/data/Database.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/io/heckel/ntfy/data/Database.kt b/app/src/main/java/io/heckel/ntfy/data/Database.kt index 94a56b9..8fc2325 100644 --- a/app/src/main/java/io/heckel/ntfy/data/Database.kt +++ b/app/src/main/java/io/heckel/ntfy/data/Database.kt @@ -112,6 +112,7 @@ abstract class Database : RoomDatabase() { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE Subscription ADD COLUMN upAppId TEXT") db.execSQL("ALTER TABLE Subscription ADD COLUMN upConnectorToken TEXT") + db.execSQL("CREATE UNIQUE INDEX index_Subscription_upConnectorToken ON Subscription (upConnectorToken)") } } }