Skip to content

SQL Server

Version 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.