Pablo
03/14/2025, 5:26 PMPablo
03/14/2025, 5:43 PM@Database(entities = [
AEntity::class,
BEntity::class,
], version = 1)
abstract class CustomDatabase : RoomDatabase() {
abstract fun customDao(): CustomDao
}
and how I load it:
Room.databaseBuilder(
androidContext(),
CustomDatabase::class.java, "custom-database"
)
.createFromAsset("data.db")
.build()
Pablo
03/14/2025, 5:50 PMversion = 1)
to 2 and adding .fallbackToDestructiveMigration()
before build()
in the databaseBuilder
, but the result of doing that, is that the app starts with ZERO data, like if the new .db file stored in assets is empty, but is not, it's full of data, I checked it.