Changelog
Notable changes to Schemic, newest first. Each entry is written from your side — what changes for code that uses the library.
Unreleased
Changed
schemic pullis now non-destructive. It previews by default and only writes with--write, making surgical edits to your.tsfiles that preserve comments, imports, and untouched fields. A git-like guard refuses to clobber local-only definitions; use--mergeto keep them or--discardto mirror the database exactly. Breaking for scripts that relied onpullwriting immediately.schemic pushreplaces the old apply command as the name for applying a schema directly to the database (aliassync). It prunes stale objects by default; pass--no-pruneto apply additions and changes only.- Migrations are idempotent. Generated DDL uses
DEFINE ... OVERWRITE,REMOVE ... IF EXISTS, andALTER, soschemic migratereplays cleanly over a database changed out-of-band (for example bypushorpull).
Added
schemic diff --tsrenders a pending change as TypeScript, laid out the waypulledits your files, instead of SurrealQL.schemic checkreplays your migrations in a throwaway engine and confirms they reproduce your schema — a CI guard against drift. It defaults to an ephemeral in-memory SurrealDB from your localsurrealCLI.- Baseline squashing via
schemic gen --baseline --force, collapsing existing migrations into one fresh baseline.
Fixed
- No more phantom migrations from cosmetic changes. Diffing now normalizes both your schema and the database into one intermediate representation before comparing, so reordering the members of an enum or union no longer generates a migration.
Where to go next
- Quickstart — the current workflow end to end.
- The migration model — the model behind these changes.
- CLI commands — every command and flag at the current version.