BrandUp.Extensions.Migrations.Abstractions
10.0.6
dotnet add package BrandUp.Extensions.Migrations.Abstractions --version 10.0.6
NuGet\Install-Package BrandUp.Extensions.Migrations.Abstractions -Version 10.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BrandUp.Extensions.Migrations.Abstractions" Version="10.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BrandUp.Extensions.Migrations.Abstractions" Version="10.0.6" />
<PackageReference Include="BrandUp.Extensions.Migrations.Abstractions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BrandUp.Extensions.Migrations.Abstractions --version 10.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BrandUp.Extensions.Migrations.Abstractions, 10.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BrandUp.Extensions.Migrations.Abstractions@10.0.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BrandUp.Extensions.Migrations.Abstractions&version=10.0.6
#tool nuget:?package=BrandUp.Extensions.Migrations.Abstractions&version=10.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BrandUp.Extensions.Migrations
Installation
NuGet-package: https://www.nuget.org/packages/BrandUp.Extensions.Migrations/
Architecture
ExampleLib1 assembly
ExampleLib1.SetupMigration
ExampleLib1.Update1Migration
ExampleLib1.Update2Migration
ExampleLib2 assembly
ExampleLib2.SetupMigration
ExampleLib2.Update1Migration
ExampleLib2.Update2Migration
MyApp assembly
MyApp.SetupMigration
MyApp.CreateIndexesMigration
MyApp.DefaultUsersMigration
options.AddAssembly(typeof(ExampleLib1.SetupMigration).Assembly);
options.AddAssembly(typeof(ExampleLib2.SetupMigration).Assembly);
options.AddAssembly(typeof(MyApp.SetupMigration).Assembly);
migrationExecutor.UpAsync()
Define migrations
[Setup]
public class SetupMigration : IMigrationHandler
{
readonly IDbContext dbContext;
public SetupMigration(IDbContext dbContext)
{
this.dbContext = dbContext;
}
public Task UpAsync(CancellationToken cancellationToken = default)
{
dbContext.Create();
return Task.CompletedTask;
}
public Task DownAsync(CancellationToken cancellationToken = default)
{
dbContext.Delete();
return Task.CompletedTask;
}
}
[Upgrade(typeof(SetupMigration))]
public class Update1Migration : IMigrationHandler
{
public Task UpAsync(CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
public Task DownAsync(CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
}
services.AddScoped<IDbContext, DbContext>();
services.AddMigrations(options => {
options.AddAssembly(typeof(SetupMigration).Assembly);
});
Up migrations
var migrationExecutor = serviceProvider.GetService<MigrationExecutor>();
migrationExecutor.UpAsync();
Down migrations
var migrationExecutor = serviceProvider.GetService<MigrationExecutor>();
migrationExecutor.DownAsync();
Store migration state
public interface IMigrationState
{
Task<bool> IsAppliedAsync(IMigrationDefinition migrationDefinition, CancellationToken cancellationToken = default);
Task SetUpAsync(IMigrationDefinition migrationDefinition, CancellationToken cancellationToken = default);
Task SetDownAsync(IMigrationDefinition migrationDefinition, CancellationToken cancellationToken = default);
}
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BrandUp.Extensions.Migrations.Abstractions:
| Package | Downloads |
|---|---|
|
BrandUp.Extensions.Migrations
Assembly migrations for .NET: discovers migration handlers across assemblies, orders them by dependency, resolves them from the DI container and tracks applied state through a pluggable store. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.6 | 127 | 5/28/2026 |
| 10.0.5 | 162 | 4/27/2026 |
| 10.0.4 | 144 | 4/20/2026 |
| 10.0.3 | 220 | 3/16/2026 |
| 10.0.2 | 141 | 3/11/2026 |
| 10.0.1 | 204 | 1/3/2026 |
| 9.0.3 | 623 | 6/10/2025 |
| 9.0.2 | 326 | 3/29/2025 |
| 9.0.1 | 285 | 12/22/2024 |
| 8.1.1 | 415 | 7/9/2024 |
| 8.0.4 | 417 | 4/29/2024 |
| 8.0.3 | 273 | 4/29/2024 |
| 8.0.2 | 276 | 4/29/2024 |
| 8.0.1 | 265 | 4/29/2024 |
| 7.0.3 | 1,026 | 3/11/2023 |
| 7.0.2 | 567 | 2/13/2023 |
| 7.0.1 | 727 | 11/10/2022 |
| 2.0.5 | 2,872 | 4/25/2022 |
| 1.0.0.5 | 2,463 | 4/30/2019 |
| 1.0.0.4 | 1,352 | 4/30/2019 |
Loading failed