From 6bddd79a75d97a38cd4794384b899c18e4aa4aa1 Mon Sep 17 00:00:00 2001 From: fisher Date: Fri, 5 Aug 2022 00:01:35 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=AD=97=E6=AE=B5=E5=8F=98=E5=8A=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/AppDatabase.kt | 5 ++--- app/src/main/java/io/legado/app/data/DatabaseMigrations.kt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/AppDatabase.kt b/app/src/main/java/io/legado/app/data/AppDatabase.kt index 64624717a..fe19b9385 100644 --- a/app/src/main/java/io/legado/app/data/AppDatabase.kt +++ b/app/src/main/java/io/legado/app/data/AppDatabase.kt @@ -20,7 +20,7 @@ val appDb by lazy { } @Database( - version = 52, + version = 51, exportSchema = true, entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class, ReplaceRule::class, SearchBook::class, SearchKeyword::class, Cookie::class, @@ -35,8 +35,7 @@ val appDb by lazy { AutoMigration(from = 47, to = 48), AutoMigration(from = 48, to = 49), AutoMigration(from = 49, to = 50), - AutoMigration(from = 50, to = 51), - AutoMigration(from = 51, to = 52) + AutoMigration(from = 50, to = 51) ] ) abstract class AppDatabase : RoomDatabase() { diff --git a/app/src/main/java/io/legado/app/data/DatabaseMigrations.kt b/app/src/main/java/io/legado/app/data/DatabaseMigrations.kt index 4fc5fce39..f315ad42d 100644 --- a/app/src/main/java/io/legado/app/data/DatabaseMigrations.kt +++ b/app/src/main/java/io/legado/app/data/DatabaseMigrations.kt @@ -48,7 +48,7 @@ object DatabaseMigrations { database.execSQL("DROP TABLE txtTocRules") database.execSQL( """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))""" ) }