Database
Infra extensions on theentity model. Base: crm-reference.aip. Spec: Specification.
Supported databases (v0.1)
| Database | Language (app) | Transpiler v0.1 |
|---|---|---|
| PostgreSQL | postgres | Planned (primary) |
| MySQL | mysql | Planned |
| SQLite, MariaDB, MongoDB, … | Roadmap | — |
database mysql in the spec today; DDL generation is not shipped yet (transpiler matrix).
Migrations
Generated fromentity with implicit fields in DDL.
seed
Indexes and constraints
| Modifier | SQL |
|---|---|
required | NOT NULL |
unique | UNIQUE |
belongs_to | REFERENCES … |
Naming
| Entity | Table | FK |
|---|---|---|
User | users | user_id |
SalesOrder | sales_orders | sales_order_id |
snake_case, plural table names.
UUID and audit
id:uuidby defaulttimestamps:created_at,updated_atsoft_delete: nullabledeleted_at
Semantic types → PostgreSQL
| AI Parlance | PostgreSQL |
|---|---|
email | TEXT + app validation |
json | JSONB |
datetime | TIMESTAMPTZ |
phone | TEXT + normalization |
