docs: resolve all open architecture questions with ADRs 009-014
Resolve OQ-01 through OQ-10 with formal ADRs and update all architecture docs to reference decisions. Add two new tracked questions (OQ-11, OQ-12) surfaced during review. ADR-009: Keep FooRelations naming convention for relation entries ADR-010: One module per database, include derived schemas by default ADR-011: Support JSX/TSX as ergonomic authoring layer ADR-012: Always .returning() with graceful fallback per dialect ADR-013: Adapter generates relations from module entries (no <relation> element) ADR-014: Leverage drizzle-kit for migrations, no native migration generator Also upgrades elements.md, hosts.md, repo-adapter.md status to stable, clarifies OQ-06 as design clarification, and specifies MySQL .returning() detection mechanism in ADR-012.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
status: draft
|
||||
last_updated: 2026-05-22
|
||||
status: stable
|
||||
last_updated: 2026-05-23
|
||||
---
|
||||
|
||||
# Hosts: Dialect Rendering via HostConfig
|
||||
@@ -110,7 +110,7 @@ root.render(UsersEl)
|
||||
|
||||
2. **[Resolved] render() return value vs context**: `render()` on the UJSX `Root` returns `void` — the rendered Drizzle tables are collected in `root.ctx.tables`. Context is the right home for this because PG hosts need auxiliary state (enum declarations) alongside the primary output. The context shape varies by dialect: SQLite uses `{ dialect: 'sqlite', tables: Record<string, SqliteTable> }`, PG uses `{ dialect: 'pg', enums: Record<string, PgEnum>, tables: Record<string, PgTable> }`.
|
||||
|
||||
3. **`prepareUpdate`/`commitUpdate` for migrations**: The UJSX reconciler's `prepareUpdate`/`commitUpdate` hooks could diff old and new element trees to produce ALTER TABLE statements. This is out of scope for phase 1, but the reconciler architecture positions us for it in a future phase.
|
||||
3. **`prepareUpdate`/`commitUpdate` for migrations**: The UJSX reconciler's `prepareUpdate`/`commitUpdate` hooks could diff old and new element trees to produce ALTER TABLE statements. This is now deferred indefinitely — ADR-014 establishes that dbtype leverages `drizzle-kit` for migrations rather than implementing its own migration generator. The reconciler architecture remains available if this decision is revisited in the future. See [ADR-014](decisions/014-leverage-drizzle-kit-for-migrations.md).
|
||||
|
||||
## References
|
||||
|
||||
|
||||
Reference in New Issue
Block a user