migtool 2.12.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global migtool --version 2.12.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local migtool --version 2.12.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=migtool&version=2.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package migtool --version 2.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 --async
# generate type-safe F# code for CRUD operations returning a Task<Result<'T,SqliteException>> value
mig seed
# seed the database by executing insert statements in SQL code
Features
- Declarative migrations
- Migration execution
- Migration execution as library
- F# code generation with type-safe CRUD operations
- Migration log
- Seed data management with idempotent upserts
Commands
mig init- Initialize a new migration project with example schema filesmig status- Generate migration SQL by comparing expected schema with current databasemig commit [-m <message>]- Generate and execute migrations step by stepmig schema- Show the current database schemamig log [-s <steps-id>]- Show migration history and execution metadatamig codegen [-d <directory>]- Generate type-safe F# code with CRUD operations from SQL schema filesmig 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
Acknowledgments
This project wouldn't have been possible without the amazing open-source community. We're especially grateful to:
- Fabulous.AST - An elegant F# DSL for code generation that made creating and manipulating F# AST a joy
- Fantomas - The excellent F# code formatter that ensures our generated code is beautiful and consistent
If you find these projects valuable, please consider supporting them:
- Star their repositories
- Contribute to their projects
- Donate to support their continued development
License
| Product | Versions 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.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.13.0 | 61 | 2/12/2026 |
| 2.12.1 | 71 | 2/11/2026 |
| 2.12.0 | 73 | 2/11/2026 |
| 2.11.0 | 74 | 2/10/2026 |
| 2.10.0 | 98 | 2/7/2026 |
| 2.9.1 | 77 | 2/6/2026 |
| 2.9.0 | 79 | 2/5/2026 |
| 2.8.0 | 84 | 2/3/2026 |
| 2.7.2 | 89 | 2/2/2026 |
| 2.7.1 | 83 | 2/2/2026 |
| 2.7.0 | 95 | 1/31/2026 |
| 2.6.0 | 84 | 1/26/2026 |
| 2.5.0 | 98 | 1/14/2026 |
| 2.4.0 | 88 | 1/14/2026 |
| 2.3.0 | 96 | 1/14/2026 |
| 2.2.0 | 91 | 1/14/2026 |
| 2.1.0 | 87 | 1/13/2026 |
| 2.0.0 | 91 | 1/13/2026 |
| 1.0.4 | 389 | 3/4/2025 |
| 1.0.3 | 243 | 1/11/2025 |
Loading failed
