DbReactor.Core 1.1.2

dotnet add package DbReactor.Core --version 1.1.2
                    
NuGet\Install-Package DbReactor.Core -Version 1.1.2
                    
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="DbReactor.Core" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DbReactor.Core" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="DbReactor.Core" />
                    
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 DbReactor.Core --version 1.1.2
                    
#r "nuget: DbReactor.Core, 1.1.2"
                    
#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 DbReactor.Core@1.1.2
                    
#: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=DbReactor.Core&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=DbReactor.Core&version=1.1.2
                    
Install as a Cake Tool

DbReactor - .NET Database Migration Framework

DbReactor is a powerful, extensible .NET database migration framework that provides version-controlled, repeatable database schema management. It supports multiple script types, database providers, and offers comprehensive tracking and rollback capabilities.

Packages

DbReactor is split into separate NuGet packages:

Core Framework

Database Providers

More database providers coming soon...

Table of Contents

Features

  • Multiple Script Types: SQL scripts, dynamic C# code scripts, and embedded resources
  • Database Agnostic: Extensible architecture supports any database platform
  • Comprehensive Tracking: Full migration history with execution time and rollback support
  • Dry Run Mode: Preview what migrations would be executed without actually running them
  • Safe Migrations: Built-in SQL injection protection and transaction management
  • Flexible Discovery: Multiple ways to organize and discover migration scripts
  • Async-First Architecture: Non-blocking database operations with cancellation tokens and sync wrappers (including DatabaseProvisioner)
  • Robust Error Handling: Detailed exception hierarchy with contextual information
  • Production Ready: Enterprise-grade security and performance optimizations

Quick Start

Choose your database provider to get started:

5-Minute Setup

# Install packages
dotnet add package DbReactor.Core
dotnet add package DbReactor.MSSqlServer
using DbReactor.MSSqlServer.Extensions;

var config = new DbReactorConfiguration()
    .UseSqlServer(connectionString)
    .UseStandardFolderStructure(typeof(Program).Assembly)
    .UseConsoleLogging()
    .CreateDatabaseIfNotExists();

var engine = new DbReactorEngine(config);
var result = await engine.RunAsync();

That's it! See the quick start guides for detailed setup instructions.

Architecture

DbReactor uses a modular architecture with clear separation of concerns:

Core Framework (DbReactor.Core)

  • Migration Engine: Orchestrates migration execution
  • Configuration Management: Centralized configuration system
  • Script Discovery: Finds and orders migration scripts
  • Abstractions: Database-agnostic interfaces

Database Providers

  • Connection Management: Database-specific connection handling
  • Script Execution: Database-specific SQL execution
  • Migration Journaling: Tracks executed migrations
  • Database Provisioning: Creates databases if needed

Key Interfaces

// Database provider interfaces
IConnectionManager     // Database connections
IScriptExecutor       // Script execution
IMigrationJournal     // Migration tracking
IDatabaseProvisioner  // Database creation

// Core interfaces
IScriptProvider       // Script discovery
ILogProvider         // Logging
ICodeScript          // C# migration scripts

Package Documentation

Core Framework

Database Providers

Examples

Basic SQL Server Migration

// Program.cs
var config = new DbReactorConfiguration()
    .UseSqlServer("Server=localhost;Database=MyApp;Trusted_Connection=true;")
    .UseStandardFolderStructure(typeof(Program).Assembly)
    .UseConsoleLogging();

var engine = new DbReactorEngine(config);
await engine.RunAsync();

Migration Files

Scripts/
├── upgrades/
│   ├── M001_CreateUsersTable.sql
│   ├── M002_SeedUsers.cs
│   └── M003_CreateIndexes.sql
└── downgrades/
    ├── M001_CreateUsersTable.sql
    ├── M002_SeedUsers.sql
    └── M003_CreateIndexes.sql

Sample Projects

  • DbReactor.RunTest - Complete working example
  • More examples in package documentation

Creating Database Providers

DbReactor is designed to be extensible. Create custom database providers by implementing the core interfaces:

public static class MyDatabaseExtensions
{
    public static DbReactorConfiguration UseMyDatabase(this DbReactorConfiguration config, string connectionString)
    {
        return config
            .UseConnectionManager(new MyConnectionManager(connectionString))
            .UseScriptExecutor(new MyScriptExecutor())
            .UseMigrationJournal(new MyMigrationJournal())
            .UseDatabaseProvisioner(new MyDatabaseProvisioner());
    }
}

Roadmap

Upcoming Database Providers

  • DbReactor.PostgreSQL - PostgreSQL support
  • DbReactor.MySQL - MySQL support
  • DbReactor.SQLite - SQLite support
  • DbReactor.Oracle - Oracle support

Planned Features

  • Migration rollback improvements
  • Schema comparison tools
  • Migration performance analytics
  • Multi-database support
  • Cloud database provider integrations

Support

  • Package Documentation: See individual package READMEs for detailed guides
  • Quick Start Guides: Step-by-step setup instructions
  • Issues: GitHub Issues
  • Discussions: GitHub Discussions

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

[Your License Here]


Ready to get started? Choose your database provider and follow the quick start guide!

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DbReactor.Core:

Package Downloads
DbReactor.MSSqlServer

SQL Server database provider for DbReactor .NET database migration system. Provides complete SQL Server support including connection management, script execution, and migration journaling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 189 8/4/2025
1.1.1 109 8/4/2025
1.1.0 47 8/3/2025
1.0.3 312 7/25/2025

Initial release of DbReactor.Core migration framework