MigLib 2.7.2

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

logo

.NET F# License: Apache2 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 (1)

Showing the top 1 NuGet packages that depend on MigLib:

Package Downloads
MigLib.Web

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.2 110 4/14/2026
7.0.1 104 4/14/2026
7.0.0 101 4/11/2026
6.0.1 105 4/10/2026
6.0.0 102 4/10/2026
5.4.0 95 4/7/2026
5.3.0 95 4/7/2026
5.2.9 166 4/3/2026
5.2.8 101 4/3/2026
5.2.7 102 4/3/2026
5.2.6 110 4/2/2026
5.2.5 115 4/2/2026
5.2.4 101 4/2/2026
5.2.3 105 4/1/2026
5.2.2 126 3/31/2026
5.2.1 119 3/30/2026
5.2.0 107 3/30/2026
5.1.0 102 3/30/2026
5.0.1 119 3/29/2026
2.7.2 106 2/2/2026
Loading failed