修复倒计时读数冻结、原因输入键盘遮挡、备注括号与任务备注截断
This commit is contained in:
@@ -27,7 +27,7 @@ object Store {
|
||||
const val INBOX_ID = 1L
|
||||
|
||||
private const val DB_NAME = "focusbox.db"
|
||||
private const val DB_VERSION = 3
|
||||
private const val DB_VERSION = 4
|
||||
|
||||
private lateinit var helper: Helper
|
||||
|
||||
@@ -109,6 +109,13 @@ object Store {
|
||||
if (oldVersion < 3) {
|
||||
db.execSQL("ALTER TABLE tasks ADD COLUMN origin_id INTEGER NOT NULL DEFAULT 0")
|
||||
}
|
||||
// v3 → v4:早期版本的原因备注带【】方括号,一次性清掉历史数据
|
||||
if (oldVersion < 4) {
|
||||
db.execSQL(
|
||||
"UPDATE tasks SET note = REPLACE(REPLACE(note, '【', ''), '】', '') " +
|
||||
"WHERE note LIKE '%【%' OR note LIKE '%】%'"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user