CH.Toolkit.Migrations 0.0.1-preview.3

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

CH.Toolkit.Migrations

Schema diffing, migration code generation, and migration runner for ClickHouse.

Key Types

  • MigrationBase -- abstract base class for migrations with Up/Down methods
  • MigrationBuilder -- fluent API for defining schema operations (CreateTable, AddColumn, AlterColumn, Sql, etc.)
  • MigrationTableBuilder -- fluent table definition with engine, OrderBy, PartitionBy, TTL, indexes, projections
  • SchemaDiffer -- compares two DatabaseSchema instances and produces SchemaOperation[]
  • MigrationCodeGenerator -- generates C# migration source files from schema operations
  • MigrationRunner -- applies migrations with distributed locking, checksum validation, and safety policies
  • MigrationEngine -- top-level orchestrator combining introspection, diffing, code generation, and execution
  • MigrationEngineOptions -- configuration record (connection string, database, cluster, safety policy, hooks)
  • SafetyPolicy -- blocks destructive operations (DROP TABLE, DROP COLUMN) by default
  • IDesignTimeSchema -- interface for defining the desired schema at design time

Dependencies

Types, Sql, Schema, Introspection + Microsoft.CodeAnalysis.CSharp, Microsoft.Extensions.Logging.Abstractions

Usage

using CH.Toolkit.Migrations.Engine;

var engine = new MigrationEngine(new MigrationEngineOptions
{
    ConnectionString = "Host=localhost;Port=9000",
    ConnectionFactory = myConnectionFactory,
    Database = "analytics"
});

// Apply all pending migrations from a list
var result = await engine.MigrateAsync(migrations);
Console.WriteLine($"Applied: {result.Applied.Count}, Skipped: {result.Skipped.Count}");

See the root README for full documentation.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CH.Toolkit.Migrations:

Package Downloads
CH.Toolkit

ClickHouse schema modeling, migrations, and query building for .NET. Meta-package that includes Types, Sql, Schema, Modeling, Query, Introspection, and Migrations.

CH.Toolkit.DependencyInjection

ASP.NET Core dependency injection extensions for CH.Toolkit. Register MigrationEngine and optionally auto-apply migrations on startup.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-preview.3 82 2/23/2026
0.0.1-preview.2 63 2/23/2026
0.0.1-preview.1 68 2/23/2026