pull/328/head
gedoor 4 years ago
parent 75ef640353
commit 4ce62ecdec
  1. 9
      app/src/main/java/io/legado/app/data/AppDatabase.kt

@ -32,7 +32,8 @@ abstract class AppDatabase : RoomDatabase() {
migration_11_12,
migration_12_13,
migration_13_14,
migration_14_15
migration_14_15,
migration_15_17
)
.allowMainThreadQueries()
.build()
@ -87,6 +88,12 @@ abstract class AppDatabase : RoomDatabase() {
database.execSQL("ALTER TABLE bookmarks ADD bookAuthor TEXT NOT NULL DEFAULT ''")
}
}
private val migration_15_17 = object : Migration(15, 17) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("CREATE TABLE IF NOT EXISTS `readRecord` (`bookName` TEXT NOT NULL, `readTime` INTEGER NOT NULL, PRIMARY KEY(`bookName`))")
}
}
}
abstract fun bookDao(): BookDao

Loading…
Cancel
Save