DotNetBrightener.DataAccess.DataMigration 2025.0.10

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DotNetBrightener.DataAccess.DataMigration --version 2025.0.10
                    
NuGet\Install-Package DotNetBrightener.DataAccess.DataMigration -Version 2025.0.10
                    
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="DotNetBrightener.DataAccess.DataMigration" Version="2025.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetBrightener.DataAccess.DataMigration" Version="2025.0.10" />
                    
Directory.Packages.props
<PackageReference Include="DotNetBrightener.DataAccess.DataMigration" />
                    
Project file
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 DotNetBrightener.DataAccess.DataMigration --version 2025.0.10
                    
#r "nuget: DotNetBrightener.DataAccess.DataMigration, 2025.0.10"
                    
#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 DotNetBrightener.DataAccess.DataMigration@2025.0.10
                    
#: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=DotNetBrightener.DataAccess.DataMigration&version=2025.0.10
                    
Install as a Cake Addin
#tool nuget:?package=DotNetBrightener.DataAccess.DataMigration&version=2025.0.10
                    
Install as a Cake Tool

Data Migration Library for .NET Core Applications

© 2025 DotNet Brightener

Versions

Package Version
DotNetBrightener.DataAccess.DataMigration NuGet Version
DotNetBrightener.DataAccess.DataMigration.Mssql NuGet Version
DotNetBrightener.DataAccess.DataMigration.PostgreSql NuGet Version
dotnet-dnb-datamigration NuGet Version

Overview

Data Migration Library is a simple library to help you manage your data migration in your .NET Core application. It provides a simple way to define your migration classes and run them in your application.

Not all applications can use DACPAC for managing database schema and data changes. Especially DACPAC does not work with other databases such as MySQL, PostgreSQL, etc. This library is designed to help you manage your data migration in your application.

Installation

Install using Package Reference

dotnet add [YOUR_PROJECT_NAME] package DotNetBrightener.DataAccess.DataMigration

If you need to data migration with SQL Server, install the following package: DotNetBrightener.DataAccess.DataMigration.Mssql

dotnet add [YOUR_PROJECT_NAME] package DotNetBrightener.DataAccess.DataMigration.Mssql

For PostgreSQL, install the following package: DotNetBrightener.DataAccess.DataMigration.PostgreSql

dotnet add [YOUR_PROJECT_NAME] package DotNetBrightener.DataAccess.DataMigration.PostgreSql

Usage

Register to Service Collection
// var _connectionString = "<your_connection_string>";

// If you use SQL Server
services.EnableDataMigrations()
        .UseSqlServer(_connectionString);

// If you use PostgreSQL
services.EnableDataMigrations()
        .UseNpgsql(_connectionString);

// if you want to auto detect all migration classes
services.AutoScanDataMigrators();

// if you want to manually register migration classes
services.AddDataMigrator<MyMigration>();

Define your migration classes

using DotNetBrightener.DataAccess.DataMigration;

[DataMigration("<your_migration_id>")]
public class MyMigration : IDataMigration
{
    // You can use Dependency Injection for injecting your services
    private readonly IMyService _myService;

    public MyMigration(IMyService myService)
    {
        _myService = myService;
    }

    public async Task MigrateData()
    {
        // Your migration code here
        await _myService.DoSomethingToMigrateData();
    }
}

Roadmap

  • Initial Release
  • Add Support for SQL Server
  • Add Support for PostgreSQL
  • CLI tool for creating migration class

CLI Tool

You can now install the cli tool from Nuget: dotnet-dnb-datamigration

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DotNetBrightener.DataAccess.DataMigration:

Package Downloads
DotNetBrightener.DataAccess.DataMigration.Mssql

Package Description

DotNetBrightener.DataAccess.DataMigration.PostgreSql

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.0.1-preview-723 39 1/15/2026
2026.0.1-preview-721 43 1/15/2026
2026.0.1-preview-717 113 1/5/2026
2026.0.1-preview-713 463 12/10/2025
2026.0.1-preview-700 228 12/7/2025
2026.0.1-preview-689 116 12/6/2025
2026.0.1-preview-676 689 12/2/2025
2026.0.1-preview-671 135 11/29/2025
2026.0.1-preview-670 124 11/29/2025
2026.0.1-preview-669 124 11/29/2025
2026.0.1-preview-667 194 11/27/2025
2026.0.1-preview-665 188 11/27/2025
2026.0.1-preview-664 189 11/27/2025
2026.0.1-preview-660 198 11/25/2025
2025.0.10 206 11/25/2025
2025.0.10-preview-628 418 11/20/2025
2025.0.10-preview-605 294 11/17/2025
2025.0.10-preview-602 296 11/17/2025
2025.0.10-preview-581 312 11/11/2025
2025.0.10-preview-559 223 10/29/2025
2025.0.10-preview-557 214 10/27/2025
2025.0.9 210 10/26/2025
2025.0.9-preview-553 193 10/26/2025
2025.0.9-preview-539 142 10/12/2025
2025.0.9-preview-535 192 10/8/2025
2025.0.9-preview-509 220 10/2/2025
2025.0.9-preview-508 203 10/2/2025
2025.0.9-preview-487 224 9/29/2025
2025.0.9-preview-481 209 9/29/2025
2025.0.9-preview-473 177 9/28/2025
2025.0.8 219 9/23/2025
2025.0.6 225 9/22/2025
2025.0.6-preview-455 213 9/22/2025
2025.0.6-preview-454 337 9/17/2025
2025.0.6-preview-441 181 9/14/2025
2025.0.6-preview-440 174 9/14/2025
2025.0.6-preview-406 216 9/2/2025
2025.0.6-preview-401 200 9/2/2025
2025.0.6-preview-400 201 9/2/2025
2025.0.6-preview-369 253 8/27/2025
2025.0.6-preview-368 244 8/27/2025
2025.0.6-preview-334 220 8/18/2025
2025.0.6-preview-333 150 7/27/2025
2025.0.6-preview-332 516 7/24/2025
2025.0.6-preview-331 520 7/24/2025
2025.0.6-preview-328 522 7/24/2025
2025.0.6-preview-327 370 7/21/2025
2025.0.6-preview-326 378 7/21/2025
2025.0.6-preview-325 289 7/20/2025
2025.0.6-preview-324 285 7/20/2025
2025.0.6-preview-322 287 7/20/2025
2025.0.6-preview-321 305 7/19/2025
2025.0.6-preview-320 280 7/19/2025
2025.0.6-preview-319 194 7/17/2025
2025.0.6-preview-317 194 7/17/2025
2025.0.6-preview-316 198 7/17/2025
2025.0.6-preview-315 205 7/17/2025
2025.0.6-preview-314 200 7/17/2025
2025.0.6-preview-313 195 7/17/2025
2025.0.6-preview-312 198 7/16/2025
2025.0.5 220 7/10/2025
2025.0.5-preview-307 127 7/5/2025
2025.0.4 136 7/5/2025
2025.0.4-preview-305 145 7/4/2025
2025.0.4-preview-304 202 7/1/2025
2025.0.4-preview-299 177 5/31/2025
2025.0.4-preview-298 151 5/30/2025
2025.0.4-preview-296 206 5/30/2025
2025.0.4-preview-295 207 5/29/2025
2025.0.4-preview-293 211 5/26/2025
2025.0.4-preview-292 210 5/26/2025
2025.0.3 202 2/10/2025
2025.0.3-preview-288 176 2/10/2025
2025.0.2 188 1/21/2025
2025.0.2-preview-278 156 1/21/2025
2025.0.2-preview-277 166 12/16/2024
2025.0.1-rc-243301701 430 11/25/2024
2024.0.14.6 182 11/25/2024
2024.0.14.6-rc-243031001 257 10/29/2024
2024.0.14.6-rc-243030701 168 10/29/2024
2024.0.14.6-rc-242840501 161 10/10/2024
2024.0.14.6-rc-242820305 153 10/8/2024
2024.0.14.6-rc-242771401 260 10/3/2024
2024.0.14.6-rc-242770501 166 10/3/2024
2024.0.14.6-rc-242770201 163 10/3/2024
2024.0.14.6-rc-242761801 171 10/2/2024
2024.0.14.6-rc-242761601 170 10/2/2024
2024.0.14.6-rc-242761501 167 10/2/2024
2024.0.14.6-rc-242761401 170 10/2/2024
2024.0.14.6-rc-242760701 186 10/2/2024
2024.0.14.6-rc-242751002 170 10/1/2024
2024.0.14.6-rc-242750901 185 10/1/2024
2024.0.14.6-rc-242750502 166 10/1/2024
2024.0.14.6-rc-242750201 182 10/1/2024
2024.0.14.6-rc-242741501 153 9/30/2024
2024.0.14.6-rc-242730701 189 9/29/2024
2024.0.14.6-preview-2730501 144 9/29/2024
2024.0.14.6-preview-2701501 202 9/26/2024
2024.0.14.6-preview-2620901 224 9/18/2024
2024.0.14.6-preview-2570701 163 9/13/2024
2024.0.14.6-preview-2510703 232 9/7/2024
2024.0.14.6-preview-2480501 198 9/4/2024
2024.0.14.6-preview-2430401 203 8/30/2024
2024.0.14.6-preview-242730701 162 9/29/2024
2024.0.14.6-preview-2421703 164 8/29/2024
2024.0.14.6-preview-2421701 163 8/29/2024
2024.0.14.6-preview-2420901 169 8/29/2024
2024.0.14.6-preview-2390101 175 8/26/2024
2024.0.14.6-preview-2381603 202 8/25/2024
2024.0.14.6-preview-2341601 220 8/21/2024
2024.0.14.6-preview-2321602 208 8/20/2024
2024.0.14.6-preview-2190801 235 8/6/2024
2024.0.14.6-preview-2041501 170 7/22/2024
2024.0.14.6-preview-1920603 220 7/10/2024
2024.0.14.6-preview-1920301 193 7/10/2024
2024.0.14.6-preview-1911302 179 7/9/2024
2024.0.14.6-preview-1901001 187 7/8/2024
2024.0.14.6-preview-1900901 170 7/8/2024
2024.0.14.6-preview-1900801 182 7/8/2024
2024.0.14.6-preview-1860304 194 7/4/2024
2024.0.14.5 243 7/1/2024
2024.0.14.5-preview-1811601 180 6/29/2024
2024.0.14.5-preview-1810501 196 6/29/2024
2024.0.14.5-preview-180132 215 6/28/2024
2024.0.14.5-preview-180131 181 6/28/2024
2024.0.14.5-preview-180121 170 6/28/2024
2024.0.14.4 205 6/27/2024
2024.0.14.4-preview-8 180 6/27/2024
2024.0.14.4-preview-7 190 6/27/2024
2024.0.14.3 202 6/21/2024
2024.0.14.1 195 6/6/2024
2024.0.14.1-preview 178 6/6/2024
2024.0.14-preview-1 182 6/6/2024
2024.0.13.8-preview 183 6/6/2024
2024.0.13.1-preview-0146 178 6/6/2024
2024.0.13-preview-1 168 6/6/2024
2024.0.12.15803-preview-03 184 6/6/2024
2024.0.12.15608 198 6/4/2024
2024.0.12.15515 251 6/3/2024
2024.0.12.15220 188 5/31/2024
2024.0.12.15220-alpha31-240... 154 5/31/2024
2024.0.12.14911 225 5/28/2024
2024.0.12.14910-alpha28-240... 171 5/28/2024
2024.0.12.14823 207 5/27/2024
2024.0.12.14522-alpha7-2405... 188 5/24/2024
2024.0.12.14514-alpha6-2405... 175 5/24/2024
2024.0.12.14511 217 5/24/2024
2024.0.12.14314 235 5/22/2024
2024.0.12.14114 236 5/20/2024
2024.0.12.12815 241 5/7/2024
2024.0.12.12814 192 5/7/2024
2024.0.12.12721 216 5/6/2024
2024.0.12.12702 197 5/5/2024
2024.0.12.12622 229 5/5/2024
2024.0.12.12514 221 5/4/2024
2024.0.12.12512 206 5/4/2024
2024.0.12.12510 205 5/4/2024
2024.0.12.12420 170 5/3/2024
2024.0.12.12319 179 5/2/2024
2024.0.12.12319-rc-2405021801 153 5/2/2024
2024.0.12.12318 172 5/2/2024