Implement: Database layer — SQLite schema, card upsert, and hash-based sync #15
Labels
No labels
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:prototype
wayfinder:research
wayfinder:research
wayfinder:task
wayfinder:task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gaetan/knowledgify#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wayfinder map: #1
Dependencies: #13 (project scaffolding), #14 (content loading)
Description
Build the database layer: SQLite schema, card upsert operations, and hash-based content sync to detect changes and reset progress when content changes.
Tasks
internal/database/packagemodernc.org/sqlitefor SQLite drivercardstable: id (TEXT PK), type (TEXT), question (TEXT), answer (TEXT), explanation (TEXT), category (TEXT), tags (TEXT), content_hash (TEXT), created_at (DATETIME), updated_at (DATETIME)progresstable: card_id (TEXT PK/FK), ease_factor (REAL, default 2.5), interval (INTEGER, default 0), repetitions (INTEGER, default 0), next_review (DATETIME), last_review (DATETIME), status (TEXT: "new"/"learning"/"review")KNOWLEDGIFY_DBenv var for DB path (from config package)Acceptance criteria