feat: Grundgerüst mit Konfiguration, SQLite-Schema und Selbsttest (M2.1)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 16:39:42 +01:00
parent cf6398f61a
commit 3e6148419b
17 changed files with 1176 additions and 2 deletions

View File

@ -0,0 +1,12 @@
# nexus-store
SQLite-Speicher mit Migrationen. Datenmodell siehe `docs/m1-spezifikation.md`, Abschnitt 5.
**Version:** wie der Workspace (`0.1.0-dev`). **Schnittstelle:**
- `Store::open(pfad)` und `Store::open_in_memory()`: öffnen und automatisch migrieren (WAL, Fremdschlüssel an).
- `schema_version()`, `integrity_check()`, `connection()`.
- `LATEST_SCHEMA_VERSION`. Eine Datenbank mit neuerer Schema-Version wird abgelehnt.
**Migrationen:** `migrations/NNNN_name.sql`, nur vorwärts, Stand in `PRAGMA user_version`. Neue Migration = neue Datei und ein Eintrag in `MIGRATIONS`.
**Tests:** `cargo test -p nexus-store` (Migration, erneutes Öffnen, Fremdschlüssel, Prüfregeln, Eindeutigkeit).