diff --git a/app/schemas/io.legado.app.data.AppDatabase/38.json b/app/schemas/io.legado.app.data.AppDatabase/38.json index ab7415219..250235ee0 100644 --- a/app/schemas/io.legado.app.data.AppDatabase/38.json +++ b/app/schemas/io.legado.app.data.AppDatabase/38.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 38, - "identityHash": "5211699415b40f58b06d4136d14173d1", + "identityHash": "5f9007af3ac118c8c2dc587723475405", "entities": [ { "tableName": "books", @@ -254,7 +254,7 @@ }, { "tableName": "book_sources", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookSourceName` TEXT NOT NULL, `bookSourceGroup` TEXT, `bookSourceUrl` TEXT NOT NULL, `bookSourceType` INTEGER NOT NULL, `bookUrlPattern` TEXT, `concurrentRate` TEXT, `customOrder` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `enabledExplore` INTEGER NOT NULL, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `bookSourceComment` TEXT, `lastUpdateTime` INTEGER NOT NULL, `respondTime` INTEGER NOT NULL, `weight` INTEGER NOT NULL, `exploreUrl` TEXT, `ruleExplore` TEXT, `searchUrl` TEXT, `ruleSearch` TEXT, `ruleBookInfo` TEXT, `ruleToc` TEXT, `ruleContent` TEXT, PRIMARY KEY(`bookSourceUrl`))", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookSourceName` TEXT NOT NULL, `bookSourceGroup` TEXT, `bookSourceUrl` TEXT NOT NULL, `bookSourceType` INTEGER NOT NULL, `bookUrlPattern` TEXT, `concurrentRate` TEXT, `customOrder` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `enabledExplore` INTEGER NOT NULL, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `bookSourceComment` TEXT, `lastUpdateTime` INTEGER NOT NULL, `respondTime` INTEGER, `weight` INTEGER NOT NULL, `exploreUrl` TEXT, `ruleExplore` TEXT, `searchUrl` TEXT, `ruleSearch` TEXT, `ruleBookInfo` TEXT, `ruleToc` TEXT, `ruleContent` TEXT, PRIMARY KEY(`bookSourceUrl`))", "fields": [ { "fieldPath": "bookSourceName", @@ -350,7 +350,7 @@ "fieldPath": "respondTime", "columnName": "respondTime", "affinity": "INTEGER", - "notNull": true + "notNull": false }, { "fieldPath": "weight", @@ -1459,7 +1459,7 @@ "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5211699415b40f58b06d4136d14173d1')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5f9007af3ac118c8c2dc587723475405')" ] } } \ No newline at end of file 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 769673cab..376bc5197 100644 --- a/app/src/main/java/io/legado/app/data/DatabaseMigrations.kt +++ b/app/src/main/java/io/legado/app/data/DatabaseMigrations.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") + database.execSQL("ALTER TABLE `book_sources` ADD `respondTime` INTEGER NOT NULL DEFAULT 180000") } } } \ No newline at end of file