Add index during migration

This commit is contained in:
Philipp Heckel 2022-01-01 00:21:59 +01:00
parent f527ee7343
commit 9cc6ffc32e

View file

@ -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)")
}
}
}