All versions since 5.1.0
5.1.0
Changed
- Implicit schemas are now ignored. Schemas owned by the database (
dbo,public,main, etc.) will now be ignored during import and planning.
Fixed
- Plugin dependencies are not shared correctly. All plugin dependencies will now be correctly loaded from their own dependency closure where the CLI does not have its own version of an assembly.
5.2.0
Changed
- Plans verify type references. Inherited from NSchema.Core 5.2.0, a plan now checks that every type the project references will exist once it applies.
Fixed
- Schema-qualified engine types no longer block planning. Applying an imported project that referenced engine types (e.g. Postgres’s
pg_catalog.tsvector) previously failed with an error demanding a declaration nobody could write.
5.3.0
Changed
- A create is a create. Built on NSchema.Core 5.3: a plan that believes it is creating a routine or view now renders a plain
CREATE, so colliding with an object the plan didn’t know about fails loudly instead of being silently overwritten; the in-place forms render only when the plan knows it is replacing.
Fixed
- Rebuilding a schema whose functions reference its tables. Routines are now created after the tables they may reference, so applying an imported schema with SQL-language functions (e.g. Pagila) no longer fails with a missing relation.
5.4.0
Added
- Aggregate support.
CREATE AGGREGATEis part of the language (inherited from NSchema.Core 5.4.0). - Plugin restore honors your project’s NuGet configuration. Plugin resolution and restore now run under the project directory, so a
NuGet.Configbeside the project applies as expected.
Fixed
- Functions that call each other now apply in the right order. Inherited from NSchema.Core 5.4: a routine’s definition is scanned for the routines it calls and the objects it reads, and creates are ordered so a callee precedes its caller.
- Plugin restore works inside a repository using central package management. Only your NuGet configuration reaches the restore now; a
Directory.Packages.props(orDirectory.Build.props) further up the tree no longer breaks it with NU1008.
5.5.0
Fixed
- Engine-native SQL bodies no longer show as permanent drift. Inherited from NSchema.Core 5.5.0, hand-written and database-written provider-native SQL (things like view bodies or trigger definitions) are now stored in the state so they can be diffed like-for-like.
5.6.0
Changed
- Full dependency graph support. Updated to NSchema.Core 5.6.0, which refactors the linearizer to be built entirely from the dependency graph.
Fixed
- Imported SQL Server projects read back. Inherits NSchema.Core 5.5.1: multi-statement routine definitions and view bodies survive the import round trip via dollar-quoted bodies, and trailing line comments no longer swallow the closing tokens.
5.6.1
Fixed
- Multi-line doc comments indent correctly. Every line of a
---doc comment on a column or setting now takes the member indent, rather than only the first. - A state payload with no captured schema is rejected. Reading one now fails as an unreadable payload, instead of throwing an NRE.
- Lockfiles are updated additively. Pinning package version now no-longer clobbers packages that weren’t in the updated list, so initializing plugins for one environment won’t remove pins for a different environment.
5.7.0
Changed
applyanddestroycapture the live schema before planning. Before the plan step ofapplyanddestroy, the state is now refreshed. This helps capture drift and also bootstraps the state before a first apply, which is particularly helpful when using the ephemeral store. Replaying a saved plan with--plan-fileis unaffected, since its statements were fixed when the plan was written.
5.7.1
Fixed
- Environment overlays can declare schema again. Database objects declared in
*.env.<name>.sqlwill now join the project alongside the base files, restoring the v4 behavior.
5.8.0
Changed
--quietnow summarizes the run’s output. A quietplanorapplyreports one line per artifact (Plan: 2 to add, 1 to change, 0 to destroy (5 statements).) instead of the full diff and SQL.--quietdrops Info diagnostics. The run-once “already executed” advisories no longer repeat on every planned run.--quietsuppresses the environment banner and secondary hint lines (such aslock acquire’s release hint), which previously printed regardless.
Fixed
--jsonno longer writes the confirmation prompt into the result stream. An interactiveapply --jsonwrote its summary and question to stdout as raw markup, breakingnschema apply --json | jq; the prompt now renders on stderr with the rest of the narration. The same fix keeps a piped--format markdownjob summary free of prompt text. Without a terminal, the summary is reported as a{"type":"log"}event so a redirected stderr stays uniform NDJSON.--jsonreports aDetailline at its own log level. Secondary hint lines were emitted as"level":"announcement", indistinguishable from top-level narration.formatrejects the presentation flags instead of ignoring them.nschema format --json(and--format,--quiet,--verbose) becauseformat’s output is the formatted code.- The
NO_COLORenvironment variable and--no-colorargs should now be respected correctly.
5.9.0
Added
Clustering and XML indexes. Added support for clustering, XML indexes and view indexes, all inherited from NSchema.Core 5.7.
5.10.0
Added
- Plugins can be loaded from a path. A
PLUGINstatement declaringpathloads the assembly directly, skipping the package restore and the shared cache entirely.
5.11.0
Added
- Diagnostic severities can be set in
.editorconfig.nschema_diagnostic.<code>.severityconfigures one finding andnschema_diagnostic_source.<source>.severityevery finding from a producer, taking Roslyn’s severity words (none,silent,suggestion,warning,error,default). A--destructive-actionsflag still wins over the file. - The diagnostics table names each finding’s code, which is what a severity is configured by.
Fixed
importreports its diagnostics whether or not it succeeded. They were shown only on failure, so a successful import had no way to tell you what it could not carry into the project.
5.11.1
Added
plan --jsonnames the action behind each statement. Every entry insqlcarries theactionit performs (CreateTable,AddForeignKey), so what a plan exercises can be read off it rather than inferred from the SQL text. Inherited from NSchema.Core.
Fixed
- An unreadable
.editorconfigno longer crashesinit,new,plan showorcompletion install/uninstall. plan showreports a corrupt plan file instead of crashing on it. Inherited from NSchema.Core: a well-formed JSON object that is not a plan deserialized into nulls, and showing it died with aNullReferenceExceptionin the reporter rather than naming the file..editorconfigseverities now reach the findings that reading a project produces, not only the engine’s.
5.11.2
Fixed
- Migration plan file unable to be deserialized. An accidental breaking change was introduced in NSchema.Core 5.9.1 that now been fixed.
5.11.3
Fixed
- Check constraints no longer cause permanent drift. Check constraints are engine-native SQL, so it gets reformatted by the database. We now store both sides of a check constraint and only compare like to like.
5.11.4
Fixed
- Engines without comment support no-longer cause errors on comments. Engines that don’t support comments now correctly ignore them.
5.11.5
All inherited from the latest NSchema.Core update.
Fixed
- Every remaining authored expression settles. Column defaults and generated expressions, index and exclusion predicates, and a domain’s checks and default are opaque SQL, rewritten by the engine, so a handwritten one would never match. All are now kept and declared like-for-like as they are for triggers, routines etc. An expression the database no longer reports is still drift, not a spelling to restore.
- Renaming a type no longer retypes the columns declared against it. The rename moved the type but left every reference naming the old one, so each column read as a retype.
- Recreate is now correctly blocked by dependents. Recreating a type that’s in use now causes an error.
- An identity that explicitly declares no options no longer differs from one that does so implicitly. No options at all and a set of unstated ones now compare equal.
- A sequence altered for one reason no longer restates the others. The change carries the folded options, so a plan that changes the cache does not also restate a start it never asked to change.
- Identity and sequence restarts now warn correctly. Restarts are data hazards: restarting the counter, means duplicate values are issued, meaning inserts collide with what is already stored.
5.12.0 Latest
Added
- NSQL extension. Project files can now be written as
.nsqlfiles, which can be syntax highlighted using NSchema.Core’s TextMate grammar.
Changed
- Default extension. When scaffolding or importing project files, the default file extension is now
.nsql