v1.3 看得见:三色错题本(红/黄/绿+待做视图) + 收尾页(表扬行为) + 小狮落库(pet_stage/pet_fed_at,247 测试)

This commit is contained in:
2026-11-23 21:31:11 +08:00
parent 2f81e07b7d
commit 53699b4e42
12 changed files with 435 additions and 24 deletions
+5 -1
View File
@@ -46,7 +46,9 @@ CREATE TABLE IF NOT EXISTS children (
grade INTEGER NOT NULL CHECK (grade BETWEEN 1 AND 6),
remind_at TEXT NOT NULL DEFAULT '19:30',
created_at TEXT NOT NULL,
deleted_at TEXT
deleted_at TEXT,
pet_stage INTEGER NOT NULL DEFAULT 0,
pet_fed_at TEXT
);
CREATE TABLE IF NOT EXISTS child_subjects (
@@ -277,6 +279,8 @@ def _migrate(conn: sqlite3.Connection) -> None:
"unstable_count": "INTEGER NOT NULL DEFAULT 0"},
"guardians": {"phone": "TEXT"},
"papers": {"clean_path": "TEXT", "image_path": "TEXT"},
# 小狮的形态与「今天喂过没有」要跨设备一致,所以落库(原来只在浏览器算出来)
"children": {"pet_stage": "INTEGER NOT NULL DEFAULT 0", "pet_fed_at": "TEXT"},
}
for table, cols in want.items():
ensure_columns(conn, table, cols)