ADR-0004: SQLx + explicit migrations, no ORM
ADR-0004: SQLx over ORM for kernel persistence
Status: accepted
Decision
Vinxi uses SQLx and explicit SQL migrations for Postgres-backed adapters. The kernel does not use an ORM as its model source.
Rules
vinxi-kernel-coredepends on ports, not SQLx.vinxi-adapter-postgresmaps SQL rows to kernel models.- SQL migrations are physical schema changes only.
- Ontology/catalog changes are kernel
Acts, not silent database migrations.
Rationale
Kernel data is not ordinary CRUD. It is log-heavy, versioned, bitemporal, provenance-aware, and plane-specific. Explicit SQL keeps atomicity, idempotency, indexes, JSONB, and PostGIS behavior visible.