Repository navigation
Command mark
github-actions[bot] edited this page Nov 17, 2026
·
1 revision
Sets one migration's state by hand.
migrate-mongo mark <id> --applied | --unapplied
migrate-mongo mark 20261014164029 --applied # it finished, or accept an edited migration's new checksum
migrate-mongo mark 20261014164029 --unapplied # it didn't; run it again next timeUse exactly one:
| Option | Meaning |
|---|---|
--applied |
Record the migration as applied, with its current checksum. |
--unapplied |
Remove the migration's state, so the next up runs it. |
-
A migration failed or crashed part-way outside a transaction and is stuck in
failed,applying(orrollingBack), which stops later runs. Look at the data, then mark it--appliedif it finished, or--unappliedif it should run again (after undoing what it did, if it isn't safe to repeat). -
An applied migration was edited on purpose and you want to accept the new code:
--appliedstores its new checksum.
Each mark is recorded in the history (markedApplied or markedUnapplied). See
Troubleshooting.
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