kumiko schema
kumiko schema <subcommand>Uses kumiko/schema.ts (ENTITY_METAS) and checked-in SQL under
kumiko/migrations/. Runtime is plain SQL — no ORM at all.
Subcommands
Section titled “Subcommands”| Subcommand | What it does |
|---|---|
generate <name> | Diff ENTITY_METAS vs last snapshot → new NNNN_<name>.sql |
validate | Static CI gate (no DB): schema drift + boot validation |
apply | Apply pending SQL files (deploy step, idempotent) |
baseline | Mark checked-in migrations applied without running SQL (legacy cutover) |
status | List applied vs pending migrations |
Typical flow
Section titled “Typical flow”cd my-app# kumiko/schema.ts exports ENTITY_METAS from composeFeatures(APP_FEATURES)bun kumiko schema generate add-notes-pinnedgit diff kumiko/migrations/ # review SQL — hand-edit OKbun kumiko schema apply # local / pre-deployConvention
Section titled “Convention”kumiko/schema.ts must export:
export const ENTITY_METAS: readonly EntityTableMeta[] = …;See kumiko-framework/samples/apps/use-all-bundled/kumiko/schema.ts.
See also
Section titled “See also”- Upgrade runbook — bumping
@cosmicdrift/*deps