disclaw/tasks/DIS-108.md
Nick Tabeling 722d85c2a5
Some checks failed
CI / build-and-test (ubuntu-latest) (pull_request) Has been cancelled
CI / build-and-test (windows-latest) (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
chore: update task board — Phase 0 and Phase 1 marked done
All DIS-001 through DIS-110 set to status:done with merge dates.
BOARD.md reorganized with Done sections per phase.
Phase 1.5 Refinement epic added as planning placeholder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:42:16 +02:00

1.3 KiB

id status phase priority labels branch assignee started pr merged
DIS-108 done 1 p1
phase:1
type:refactor
priority:p1
phase-1/db-schema-ssot claude-agent null null 2026-04-10

DIS-108: DB-Schema SSOT → src/db/schema.sql

Ziel

Das SQLite-Schema ist in einer einzigen schema.sql-Datei definiert (Single Source of Truth). database.ts liest und führt die Datei aus statt SQL inline zu haben.

Kontext

docs/development-plan.md §2 (DB-Architektur), Phase 1 Task 8.

Scope

  • In: src/db/schema.sql mit allen CREATE TABLE-Statements (inkl. conversations-Index) · database.ts liest Schema via fs.readFileSync und wendet es über db.run() auf die SQLite-Instanz an · Bestehende Inline-SQL entfernen
  • Out: DB-Migrations-System (kommt mit Phase 2 session_id-Spalte als erstes Delta)

Definition of Done

  • schema.sql enthält alle Tabellen und Indizes
  • database.ts hat kein Inline-DDL mehr
  • Integration-Test tests/integration/db-init.test.ts mit tmp-SQLite verifiziert: Tabellen existieren, Indizes greifen, zweites Ausführen ist idempotent
  • npm run build && npm test grün

Dateien (erwartet)

  • src/db/schema.sql
  • src/db/database.ts
  • tests/integration/db-init.test.ts

Abhängigkeiten

Blockiert durch: DIS-101.

Spec

docs/backlog.md #DIS-108