MigLib 2.4.0

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

logo

NuGet Version NuGet Downloads Tests

Migrate is a tool for performing declarative migrations by finding differences between an expected database schema and the existing one, currently in a SQLite database. It also generates type-safe F# code with CRUD operations for your database schema.

Installation

If you just want to test the tool without installing .Net, then you can use a Docker image:

podman run -it 'mcr.microsoft.com/dotnet/sdk:10.0' bash

Inside the container run:

export PATH="$PATH:/root/.dotnet/tools"

After having .Net in your system you can run

dotnet tool install --global migtool

Quickstart

mkdir test_db
cd test_db
mig init
# generated project files with example definitions
mig status
# output shows migration for existing definitions
mig commit
# generates and executes migration
mig log
# output shows migration metadata and a summary of executed steps
mig codegen
# generates type-safe F# code with CRUD operations

Features

Commands

  • mig init - Initialize a new migration project with example schema files
  • mig status - Generate migration SQL by comparing expected schema with current database
  • mig commit [-m <message>] - Generate and execute migrations step by step
  • mig schema - Show the current database schema
  • mig log [-s <steps-id>] - Show migration history and execution metadata
  • mig codegen [-d <directory>] - Generate type-safe F# code with CRUD operations from SQL schema files
  • mig seed - Execute seed statements (INSERT OR REPLACE) from SQL files

Contributing

How to contribute:

  • Open an issue to discuss the change and approach
  • Add relevant tests
  • Create a pull request mentioning the issue and also including a summary of the problem and approach to solve it
  • Wait for the review

License

Apache 2.0

Product 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.0 69 1/14/2026
2.4.0 67 1/14/2026
2.3.0 70 1/14/2026
2.0.0 69 1/13/2026
1.0.4 275 3/4/2025
1.0.3 135 1/11/2025
1.0.2 137 1/11/2025