cannot add a NOT NULL column with default value NULL

pull/1282/head
Jason Yao 3 years ago
parent 0e96739e61
commit 3463f251fe
  1. 2
      app/src/main/java/io/legado/app/data/DatabaseMigrations.kt
  2. 2
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  3. 2
      app/src/main/java/io/legado/app/help/BookSourceAnalyzer.kt

@ -300,7 +300,7 @@ object DatabaseMigrations {
private val migration_37_38 = object : Migration(37, 38) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("ALTER TABLE book_sources ADD respondTime INTEGER NOT NULL")
database.execSQL("ALTER TABLE `book_sources` ADD `respondTime` INTEGER")
}
}
}

@ -33,7 +33,7 @@ data class BookSource(
var loginCheckJs: String? = null, //登录检测js
var bookSourceComment: String? = null, // 注释
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var respondTime: Long = 180000L, // 响应时间,用于排序
var respondTime: Long? = 180000L, // 响应时间,用于排序
var weight: Int = 0, // 智能排序的权重
var exploreUrl: String? = null, // 发现url
var ruleExplore: ExploreRule? = null, // 发现规则

@ -161,7 +161,7 @@ object BookSourceAnalyzer {
var loginCheckJs: String? = null, //登录检测js
var bookSourceComment: String? = "", //书源注释
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var respondTime: Long = 180000L, // 响应时间,用于排序
var respondTime: Long? = 180000L, // 响应时间,用于排序
var weight: Int = 0, // 智能排序的权重
var exploreUrl: String? = null, // 发现url
var ruleExplore: Any? = null, // 发现规则

Loading…
Cancel
Save