pull/1625/head
kunfei 3 years ago
parent 92b17650bf
commit a0d6c9942d
  1. 4
      app/src/main/java/io/legado/app/data/AppDatabase.kt

@ -50,8 +50,8 @@ abstract class AppDatabase : RoomDatabase() {
private const val DATABASE_NAME = "legado.db"
fun createDatabase(context: Context) =
Room.databaseBuilder(context, AppDatabase::class.java, DATABASE_NAME)
fun createDatabase(context: Context) = Room
.databaseBuilder(context, AppDatabase::class.java, DATABASE_NAME)
.fallbackToDestructiveMigrationFrom(1, 2, 3, 4, 5, 6, 7, 8, 9)
.addMigrations(*DatabaseMigrations.migrations)
.allowMainThreadQueries()

Loading…
Cancel
Save