I'm trying to use Room in a KMP compose desktop ap...
# multiplatform
p
I'm trying to use Room in a KMP compose desktop app. How to deal with
.addMigrations(MIGRATIONS)
in official documentation sample?
MIGRATIONS
does not exist https://developer.android.com/kotlin/multiplatform/room
Copy code
fun getRoomDatabase(
    builder: RoomDatabase.Builder<AppDatabase>
): AppDatabase {
  return builder
      .addMigrations(MIGRATIONS)
      .fallbackToDestructiveMigrationOnDowngrade()
      .setDriver(BundledSQLiteDriver())
      .setQueryCoroutineContext(Dispatchers.IO)
      .build()
}
Also,
fallbackToDestructiveMigrationOnDowngrade
guives this exception: No value passed for parameter 'dropAllTables'. Documentation is not very clear to be honest
h
MIGRATIONS
is something you pass down as your own implementation