|
|
|
@ -19,7 +19,7 @@ import java.util.* |
|
|
|
|
RssSource::class, Bookmark::class, RssArticle::class, RssReadRecord::class, |
|
|
|
|
RssStar::class, TxtTocRule::class, ReadRecord::class, HttpTTS::class, Cache::class, |
|
|
|
|
RuleSub::class], |
|
|
|
|
version = 27, |
|
|
|
|
version = 28, |
|
|
|
|
exportSchema = true |
|
|
|
|
) |
|
|
|
|
abstract class AppDatabase : RoomDatabase() { |
|
|
|
@ -53,7 +53,8 @@ abstract class AppDatabase : RoomDatabase() { |
|
|
|
|
migration_10_11, migration_11_12, migration_12_13, migration_13_14, |
|
|
|
|
migration_14_15, migration_15_17, migration_17_18, migration_18_19, |
|
|
|
|
migration_19_20, migration_20_21, migration_21_22, migration_22_23, |
|
|
|
|
migration_23_24, migration_24_25, migration_25_26, migration_26_27 |
|
|
|
|
migration_23_24, migration_24_25, migration_25_26, migration_26_27, |
|
|
|
|
migration_27_28 |
|
|
|
|
) |
|
|
|
|
.allowMainThreadQueries() |
|
|
|
|
.addCallback(dbCallback) |
|
|
|
@ -257,6 +258,13 @@ abstract class AppDatabase : RoomDatabase() { |
|
|
|
|
database.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_bookmarks_time` ON `bookmarks` (`time`)") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private val migration_27_28 = object : Migration(27, 28) { |
|
|
|
|
override fun migrate(database: SupportSQLiteDatabase) { |
|
|
|
|
database.execSQL("ALTER TABLE rssArticles ADD variable TEXT") |
|
|
|
|
database.execSQL("ALTER TABLE rssStars ADD variable TEXT") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |