Migrations
View as MarkdownIdentity
Section titled “Identity”Generated API package scripts backed by Drizzle Kit.
Contract
Section titled “Contract”db:generate --name <name>writes SQL, journal, and snapshot artifacts underpackages/api/migrations/. Review the generated SQL and snapshot before applying them.db:migrateapplies pending committed artifacts to the configured SQLite database.db:checkrunsdrizzle-kit check. It validates the Drizzle migration snapshot chain; it does not inspect live tables or prove that migrations were applied.- Server startup separately checks migration files against the applied ledger and does not apply migrations automatically.
Minimal lookup
Section titled “Minimal lookup”pnpm --filter ./packages/api db:generate --name add_fieldpnpm --filter ./packages/api db:migratepnpm --filter ./packages/api db:check