feat(cli): add migration:log and migration:unlog commands#7347
Merged
B4nan merged 4 commits intomikro-orm:nextfrom Apr 18, 2026
Merged
feat(cli): add migration:log and migration:unlog commands#7347B4nan merged 4 commits intomikro-orm:nextfrom
migration:log and migration:unlog commands#7347B4nan merged 4 commits intomikro-orm:nextfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #7347 +/- ##
========================================
Coverage 99.64% 99.64%
========================================
Files 262 262
Lines 25931 25953 +22
Branches 6696 7149 +453
========================================
+ Hits 25840 25862 +22
Misses 85 85
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Please update the snapshots. |
Author
|
@B4nan thanks for the fixes. |
Add two new CLI commands for manual migration bookkeeping: - `migration:log` marks a migration as executed without running it - `migration:unlog` removes a migration from the executed list without reverting it These use the existing `Migrator.logMigration()` and `Migrator.unlogMigration()` methods exposed via the MigrationRunner. Closes mikro-orm#5390
…on:unlog Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e directly Add logMigration/unlogMigration to IMigrator interface and AbstractMigrator so the CLI doesn't bypass the migrator layer by reaching into the @internal getStorage(). Also tighten close() assertion in tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dd6d7f2 to
30de23e
Compare
Member
|
Looks like you just overridden my fixes, the snapshot updates are gone... edit: or maybe it wasnt about snapshots? lets see what the tests will say :] |
Author
|
Sorry about the force push. I rebased onto latest master but your two commits are in the branch history. CI is green now. |
B4nan
approved these changes
Apr 18, 2026
migration:log and migration:unlog commands
B4nan
added a commit
that referenced
this pull request
Apr 19, 2026
## Summary - Add `migration:log` and `migration:unlog` CLI commands - `migration:log` marks a migration as executed without running it - `migration:unlog` removes it from the executed list without reverting - Add entries to the migrations documentation Closes #5390 --------- Co-authored-by: Martin Adámek <banan23@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
B4nan
added a commit
that referenced
this pull request
Apr 20, 2026
## Summary - Add `migration:log` and `migration:unlog` CLI commands - `migration:log` marks a migration as executed without running it - `migration:unlog` removes it from the executed list without reverting - Add entries to the migrations documentation Closes #5390 --------- Co-authored-by: Martin Adámek <banan23@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
migration:logandmigration:unlogCLI commandsmigration:logmarks a migration as executed without running itmigration:unlogremoves it from the executed list without revertingCloses #5390