Repository navigation
Home
github-actions[bot] edited this page Nov 17, 2026
·
2 revisions
Database migrations for MongoDB in .NET. Write migrations in C# with the official MongoDB C# driver, declare what your collections should look like, and apply both from the command line, your build server or your application.
Note
These pages are published from the wiki/
folder on main. To fix or improve them, open a pull request there; edits made in the wiki itself are overwritten.
-
Installation: install the
migrate-mongotool. - Getting Started: from nothing to an applied, inspected and rolled-back migration against a local MongoDB.
-
Project Setup:
init, thedotnet newtemplates and using an existing project.
-
Configuration: every
migrate-mongo.yamlsetting. - Commands: every command and option.
- Exit Codes, Build Errors, What Gets Stored and Packages.
- How It Works: the tool, your migrations project and why versions don't clash.
- Migrations vs Collection Definitions: which to use when.
- Safety: locking, checksums, transactions and cancellation.
Kevsoft.MigrateMongo ·
NuGet ·
Releases ·
Issues ·
Found a mistake? These pages live in
wiki/ on main; pull requests welcome.
Get started
Migrations
- Writing Migrations
- Transactions
- Recording Results
- Dependency Injection
- Custom Templates
- Adopting an Existing Database
Collections
- Managing Collections
- Indexes
- Search Indexes
- Collection Options
- Validators
- Views
- Undeclared Collections
Deploying
Connecting
Reference
Concepts