Skip to content

feat(memory): SQLite database setup with migrations (#90)#143

Merged
radoxtech merged 1 commit intomainfrom
feat/dc-mem-001-sqlite-database-setup-#90
Mar 20, 2026
Merged

feat(memory): SQLite database setup with migrations (#90)#143
radoxtech merged 1 commit intomainfrom
feat/dc-mem-001-sqlite-database-setup-#90

Conversation

@radoxtech
Copy link
Copy Markdown
Owner

Closes #90

Summary

Implements DC-MEM-001: SQLite database setup with migrations for the @diricode/memory package.

Changes

  • Database client (src/db/client.ts): Singleton SQLite client using better-sqlite3 with WAL mode and foreign keys enabled
  • Path resolution (src/db/path.ts): CWD-derived DB path resolution to .dc/memory.db with automatic directory creation
  • Schema versioning (src/db/schema/version.ts): schema_versions table for tracking applied migrations
  • Migration runner (src/db/migrations/runner.ts): Forward-only migration executor with transaction support
  • Initial schema (src/db/migrations/001_initial_schema.ts): Creates observations and timeline_events tables

Epic Context

Part of Epic #11 — Memory and Project State Backbone [MVP-1]

Verification

  • pnpm typecheck passes with zero errors
  • pnpm build succeeds
  • Functional tests verify singleton pattern, schema versioning, and table creation

@radoxtech radoxtech merged commit e8ccda1 into main Mar 20, 2026
@radoxtech radoxtech deleted the feat/dc-mem-001-sqlite-database-setup-#90 branch March 21, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DC-MEM-001: SQLite database setup with migrations [MVP-1]

1 participant