push
Generate and migrate in a single step.
push is a convenience command that combines generate and migrate into one call. It diffs your schema, creates a new migration, and immediately applies it to the database.
Usage
- npm
- pnpm
- Bun
- Yarn
npm exec durcno push [--config path/to/durcno.config.ts]
pnpm exec durcno push [--config path/to/durcno.config.ts]
bunx durcno push [--config path/to/durcno.config.ts]
yarn durcno push [--config path/to/durcno.config.ts]
Common options
--config <path>— Path to config file (defaults todurcno.config.ts).
What it does
- Runs
generateto compare your current schema with the last recorded snapshot. - Then runs
migrateto apply any pending migrations.
Example
- npm
- pnpm
- Bun
- Yarn
npm exec durcno push
pnpm exec durcno push
bunx durcno push
yarn durcno push
When there are schema changes:
Migration 2026-02-26T10-15-30.456Z created at migrations/2026-02-26T10-15-30.456Z.
[SUCCESS] Migration 2026-02-26T10-15-30.456Z applied.
When the database is already up to date:
No changes detected. Skipping migration creation.
Tips
- Use
pushduring local development for a fast generate-and-apply workflow. - For production, prefer running
generateandmigrateseparately so you can review the generatedup.tsanddown.tsbefore applying.
Next: roll back a migration with durcno down.