Fluens.Migrations.SqlServer
0.7.10
dotnet add package Fluens.Migrations.SqlServer --version 0.7.10
NuGet\Install-Package Fluens.Migrations.SqlServer -Version 0.7.10
<PackageReference Include="Fluens.Migrations.SqlServer" Version="0.7.10" />
<PackageVersion Include="Fluens.Migrations.SqlServer" Version="0.7.10" />
<PackageReference Include="Fluens.Migrations.SqlServer" />
paket add Fluens.Migrations.SqlServer --version 0.7.10
#r "nuget: Fluens.Migrations.SqlServer, 0.7.10"
#:package Fluens.Migrations.SqlServer@0.7.10
#addin nuget:?package=Fluens.Migrations.SqlServer&version=0.7.10
#tool nuget:?package=Fluens.Migrations.SqlServer&version=0.7.10
Fluens.Migrations.SqlServer
SQL Server provider for Fluens.Migrations — nvarchar(max) attempt_history column type, datetimeoffset column helper, and FluentMigrator.SqlServer partial-index filters.
Installation
dotnet add package Fluens.Migrations.SqlServer
Usage
Opt in from the AddFluens callback on FluentMigrator's own ConfigureRunner pipeline — there is no separate
top-level registration method:
services.AddFluentMigratorCore()
.ConfigureRunner(rb => rb
.AddSqlServer() // FluentMigrator's own provider registration
.WithGlobalConnectionString(connectionString)
.ScanIn(typeof(CreateOrdersSchema).Assembly).For.Migrations()
.AddFluens(f => f.AddSqlServer())); // Fluens provider-conventions opt-in
AddSqlServer() registers SqlServerMigrationConventions as the singleton IMigrationProviderConventions
(TryAddSingleton — calling it twice, or alongside AddPostgres(), keeps whichever ran first). FluentMigrator's
own constructor injection resolves it into every FluensMigration subclass at runtime — a single, unchanged
migration class creates the same schema on both providers.
Conventions
| Convention | Value |
|---|---|
JsonColumnType (dead-letter attempt_history) |
nvarchar(max) |
ApplyFilter |
FluentMigrator.SqlServer's .Filter(predicate) extension — every <column> IS NULL clause in the predicate is bracket-quoted first so the resulting DDL text matches SQL Server's sys.indexes.filter_definition normalization and the Fluens.Messaging.SqlServer EF HasFilter strings |
Column type helpers
using Fluens.Migrations.SqlServer;
Create.Table("customers").InSchema("orders")
.WithColumn("id").AsInt32().PrimaryKey().Identity()
.WithColumn("notes").AsNVarCharMax().Nullable() // unbounded Unicode text
.WithColumn("created_at").AsDateTimeOffset2().NotNullable(); // timestamp with time zone
AsDateTimeOffset2() is the SQL Server counterpart to PostgreSQL's AsTimestampTz() — named with a trailing
"2" because IColumnTypeSyntax<TNext> already declares a member method AsDateTimeOffset(), which would
otherwise shadow an extension method of the same name.
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Fluens.Migrations (>= 0.7.10)
- FluentMigrator.Extensions.SqlServer (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.