Migrate from TinyDB to SQLite

- Replace TinyDB (JSON file) with sqlite3 for data persistence
- Add schema.py: table creation + data migration from db.json
- Rewrite database.py: all CRUD operations use sqlite3 directly
- All data retains original IDs via migration script
- Remove tinydb dependency from pyproject.toml
This commit is contained in:
Yuyao Huang
2026-05-08 16:18:26 +08:00
parent b060ba6bf8
commit a8fe6ed7b3
6 changed files with 289 additions and 92 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ function openModal(goal = null) {
if (goal) {
modalTitle.textContent = "Edit Goal";
goalId.value = goal.doc_id;
goalId.value = goal.id;
goalTitle.value = goal.title;
} else {
modalTitle.textContent = "Create Goal";