Repository navigation
Command validate
github-actions[bot] edited this page Nov 17, 2026
·
1 revision
Checks the applied migrations against the code. Read-only, so a read-only database user is enough.
migrate-mongo validate
$ migrate-mongo validate
Validation passed.
It fails with exit code 4 if:
- an applied migration was edited (its checksum changed), unless
onChecksumMismatchiswarnorignore; - an applied migration is missing from the code;
- a pending migration is older than the newest applied one, unless
allowOutOfOrderis set.
Run it in pull request builds against a shared environment, so an edited migration is caught before it's merged. See Running in CI.
0 when everything matches, 4 when it doesn't. See Exit Codes.
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