Skip to content

SQL Server

4.3.0 Latest

Added

  • Supports the MIGRATION FOR data migrations introduced in NSchema.Core 4.3: the migration’s SQL is executed verbatim at its planned position in the migration.

4.0.0

Added

  • Added plugin manifest to allow for automatic registration of the provider coming in `NSchema 4.0.0.

3.0.1

Fixed

  • Fixes the ability to drop schemas by updating to NSchema.Core 3.3.0 that properly emits DROP statements for schema children.

3.0.0

First release of the SQL Server provider for NSchema, tracking NSchema 3.2.0 (and requiring NSchema.Core 3.2.0 for in-place column alteration and inline-body trigger support).

Added

  • NSchemaApplicationBuilder.UseSqlServerSchema(...) extensions for registering the provider. Overloads for a connection string and a SqlConnectionStringBuilder configuration delegate, plus a no-arg form for a connection registered elsewhere, and UseSqlServerGenerator() for registering only the SQL generator.
  • SqlServerSchemaProvider implements ISchemaProvider to reads the live database from the sys.* catalog views (tables, columns with identity/computed/default, primary keys, foreign keys, unique and check constraints, indexes with INCLUDE/filters, views, sequences, functions/procedures, table grants, triggers, and MS_Description extended-property comments).
  • SqlServerSqlGenerator implements ISqlGenerator to translates an NSchema MigrationPlan into T-SQL: bracket-quoted identifiers, IDENTITY(seed, increment), persisted computed columns, CREATE OR ALTER views and routines, extended-property comments, and a folded ALTER COLUMN for paired type/nullability changes. Features SQL Server has no equivalent for raise a clear NotSupportedException.
  • SqlType.Money, SqlType.Xml, and SqlType.RowVersion extension helpers for SQL Server-specific column types.