kumiko migrate
kumiko migrate <subcommand>Legacy path for apps with drizzle.config.ts + drizzle/migrations/.
New apps should use kumiko schema instead
(kumiko/schema.ts + kumiko/migrations/).
kumiko migrate runs per app workspace — it expects drizzle.config.ts
in the current directory.
Subcommands
Section titled “Subcommands”| Subcommand | What it does |
|---|---|
generate-schema | Regenerate drizzle/schema.generated.ts from your entities |
generate | generate-schema + drizzle-kit generate (writes migration file) |
apply | drizzle-kit migrate (apply pending migrations) |
validate | Schema-drift check (DB vs. journal/snapshot) |
status | drizzle-kit check |
drop | Drop the latest migration |
Typical flow
Section titled “Typical flow”# After adding/changing an entity:cd samples/apps/my-appbun kumiko migrate generate # writes a new migration file# review the .sql in drizzle/migrations/bun kumiko migrate apply # applies itDrift check
Section titled “Drift check”validate compares your DB’s actual schema against the journal
(drizzle/migrations/_journal.json) and a checked-in snapshot:
bun kumiko migrate validate# ✓ no drift — DB matches journal# … or:# ✗ drift detected: 2 unexpected columns, 1 missing indexExit 0 when in sync, 1 when drifted. Wire it into CI for main
branch protection.
Why per-app
Section titled “Why per-app”Multi-tenant apps own their schema; the framework owns its event store.
Migration scoping is by app workspace, not by repo. Run kumiko migrate
from inside the app directory.
See also
Section titled “See also”kumiko schema— drizzle-free migration pathkumiko ops— event-store seed workflow (not DB migrations)