How to implement guide with room database migration causing sqlitedatabaselockedexception on android 14
I've been banging my head against this for hours. I'm working with a `SQLiteDatabaseLockedException` when trying to migrate my Room database on Android 14. The migration is supposed to add a new column to an existing table, but it seems to get locked after I initiate the migration. I've implemented a migration strategy as follows: ```kotlin val MIGRATION_1_2 = object : Migration(1, 2) { override fun migrate(database: SupportSQLiteDatabase) { database.execSQL("ALTER TABLE users ADD COLUMN age INTEGER DEFAULT 0") } } ``` When I run the app, I get the following behavior: `SQLiteDatabaseLockedException: A DB lock could not be obtained within 5000ms`. I've checked if there are any ongoing transactions or if I'm not closing the database connections properly in other parts of the app, but I need to seem to find anything. I also tried adding a timeout to the database instance, but that didn't help. My Room database is initialized like this: ```kotlin val db = Room.databaseBuilder( context.applicationContext, AppDatabase::class.java, "app_database" ) .addMigrations(MIGRATION_1_2) .build() ``` The database is accessed in multiple places, and I'm using a singleton pattern to ensure there's only one instance. I tried cleaning and rebuilding the project, but the scenario continues. Has anyone encountered this question or have any insights on how to solve it? Any help would be appreciated!