Skip to content Skip to sidebar Skip to footer

Room Migration: "no Such Table: Room_table_modification_log"

Room 1.1.0 version. I am getting this error on the first run after migration. It runs well if I close the app and start it again. ROOM: Cannot run invalidation tracker. Is the db

Solution 1:

Bump up the version to 1.1.1-rc1 and this nonsensical error that stems from Google's own code will not happen anymore, I've tested the same scenario on numerous devices.

Also see my question/answer here

Solution 2:

Solution 3:

in my case, i failed with this bug when I used LiveData and overrided onOpen(db: SupportSQLiteDatabase) when i created instance of RoomDatabse

Room.databaseBuilder(context.applicationContext, AppDatabase::class.java, DATABASE_NAME)
            .addMigrations(MIGRATION_1_2)
            .addCallback(object : Callback() {
                overridefunonCreate(db: SupportSQLiteDatabase) {
                    super.onCreate(db)
                    initTypeDataFirstTime(context)
                }

                overridefunonOpen(db: SupportSQLiteDatabase) {
                    super.onOpen(db)
                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
                        db.disableWriteAheadLogging()
                    }
                }
            })
                .build()

Post a Comment for "Room Migration: "no Such Table: Room_table_modification_log""