Revert "修复数据库字段变动的问题"

pull/2130/head^2
fisher 2 years ago
parent fab294417d
commit 6bddd79a75
  1. 5
      app/src/main/java/io/legado/app/data/AppDatabase.kt
  2. 2
      app/src/main/java/io/legado/app/data/DatabaseMigrations.kt

@ -20,7 +20,7 @@ val appDb by lazy {
} }
@Database( @Database(
version = 52, version = 51,
exportSchema = true, exportSchema = true,
entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class, entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class,
ReplaceRule::class, SearchBook::class, SearchKeyword::class, Cookie::class, ReplaceRule::class, SearchBook::class, SearchKeyword::class, Cookie::class,
@ -35,8 +35,7 @@ val appDb by lazy {
AutoMigration(from = 47, to = 48), AutoMigration(from = 47, to = 48),
AutoMigration(from = 48, to = 49), AutoMigration(from = 48, to = 49),
AutoMigration(from = 49, to = 50), AutoMigration(from = 49, to = 50),
AutoMigration(from = 50, to = 51), AutoMigration(from = 50, to = 51)
AutoMigration(from = 51, to = 52)
] ]
) )
abstract class AppDatabase : RoomDatabase() { abstract class AppDatabase : RoomDatabase() {

@ -48,7 +48,7 @@ object DatabaseMigrations {
database.execSQL("DROP TABLE txtTocRules") database.execSQL("DROP TABLE txtTocRules")
database.execSQL( database.execSQL(
"""CREATE TABLE txtTocRules(id INTEGER NOT NULL, """CREATE TABLE txtTocRules(id INTEGER NOT NULL,
name TEXT NOT NULL, rule TEXT NOT NULL, serialNumber INTEGER NOT NULL, name TEXT NOT NULL, rule TEXT NOT NULL,example TEXT DEFAULT NULL, serialNumber INTEGER NOT NULL,
enable INTEGER NOT NULL, PRIMARY KEY (id))""" enable INTEGER NOT NULL, PRIMARY KEY (id))"""
) )
} }

Loading…
Cancel
Save