OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Spec-first physical-table contracts. Each `DatabaseTableSpec` declares columns (type/nullable/default), primary key, foreign-key relations, and the mandatory `tenantColumn` anchoring row-level tenant isolation.
•
Declared as the `DatabaseTableSpecModel` `SchemaModel`; the TS shape is its
Zod-inferred form.
•
`defineDatabaseTable(spec)` is fail-closed: it rejects a missing/empty
`tenantColumn`, a `tenantColumn` absent from `columns`, and PK/FK columns that reference unknown columns.
•
`registerDatabaseTable`/`listDatabaseTables` expose the canonical registry
that the Drizzle generator (F2) and relational read-model (F3) compile against.