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
npx schemic pushpush 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:
npx schemic push --dry-runRun 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:
npx schemic push --no-pruneWatch and re-push
--watch re-pushes whenever your schema files change — a tight loop while designing a schema locally:
npx schemic push --watchWhere to go next
- Generate & run migrations — the versioned alternative.
- The migration model — push vs migrate vs pull.
- Adopt an existing database — the reverse direction,
pull.