Files
nexus/crates/nexus-store/README.md
2026-11-15 09:19:00 +01:00

13 lines
697 B
Markdown

# nexus-store
SQLite-Speicher mit Migrationen. Datenmodell siehe `docs/m1-spezifikation.md`, Abschnitt 5.
**Version:** wie der Workspace (`0.1.3`). **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).