Command-line interface
Run comparisons, fail builds on unexpected drift, and export migration scripts from CI. Enterprise only.
schemasync.exe exposes comparison and script generation for use in a pipeline. It never applies changes — deployment stays a deliberate act performed by a person or by your own release tooling.
Compare two endpoints
Command Prompt
schemasync compare ^ --source "server=db-stage;database=orders;user=ci_ro" ^ --target "server=db-prod;database=orders;user=ci_ro" ^ --filters .\schemasync-filters.json ^ --report .\artifacts\schema-diff.html ^ --fail-on-differenceExit codes
| Code | Meaning |
|---|---|
| 0 | Completed; the schemas match, or differences were found and --fail-on-difference was not set |
| 1 | Differences were found and --fail-on-difference was set |
| 2 | Could not connect, or authentication failed |
| 3 | Invalid arguments or an unreadable filter file |
| 4 | Licence missing or expired |
Export a migration script as a build artefact
Command Prompt
schemasync script ^ --source "server=db-stage;database=orders;user=ci_ro" ^ --target "server=db-prod;database=orders;user=ci_ro" ^ --out .\artifacts\migration.sql ^ --include-drops falsePass credentials from your CI secret store as environment variables rather than writing them into the command. Any connection string value may be given as %ENV_VAR%.