Sync without migrations

schemic push (alias sync) applies your schema straight to the database, no migration files involved. It is the fast-iteration counterpart to gen + migrate: you get the schema in place immediately, at the cost of a versioned history.

Use it for local development and scratch databases. For shared or production databases, where you want a reviewable, reversible trail, use migrations instead.

Push the current schema

Shell
npx schemic push

push diffs your schema against the live database and applies the difference declaratively. There is no migration file and no snapshot to advance — the database ends up matching your schema directly.

Preview first with a dry run

--dry-run shows what push would change without touching the database:

Shell
npx schemic push --dry-run

Run this before pushing to an unfamiliar database, so a destructive change does not surprise you.

Control pruning

By default push makes the database match your schema exactly, which means removing objects that exist in the database but not in your schema. To apply only additions and changes, keep stale objects with --no-prune:

Shell
npx schemic push --no-prune

Watch and re-push

--watch re-pushes whenever your schema files change — a tight loop while designing a schema locally:

Shell
npx schemic push --watch

Where to go next