Skip to content
The NSchema logo

NSchema

A declarative database schema migration tool. Describe the schema you want; NSchema computes and applies the migration to get there.

Declarative SQL, not migrations

Declare your schema using only familiar CREATE-based SQL statements. NSchema diffs it against the recorded state of the database and computes the migration automatically.

Plan before you apply

Every run previews the exact changes first, Terraform-style. See the schema and the exact SQL that will be executed before you apply. Not ready to commit? Save the plan-file to disk, and apply it later.

Safe by default

Destructive changes are blocked by default unless overridden, drift checking prevents unintended changes, and offline state snapshots allow you to produce plans without needing direct access to the database.

Adopt any database

Connect to an existing database using a supported NSchema provider. Run nschema import to write your current schema out as NSQL, ready to check in and manage from there. NSchema only ever touches what you hand it.