You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compute deterministic migration plans, isolate scopes, and make DryRun read-only through an additive history contract. Preserve legacy history-property behavior. Improve rollback, cache invalidation, caller connection ownership, and SQLite foreign-key restoration/integrity validation. Post-commit callbacks no longer trigger a misleading rollback. Validation: 68 unit tests and 141 SQLite tests passed; existing issue #139 test remains skipped. Server-backed CI is required before merge. First PR in the upgrade series; please review and merge manually.
Include legacy scope compatibility, pre-transaction history initialization, failed-commit recovery, and stacked PR CI coverage from #173. Keep provider corrections layered on the corrected runner.
Dry-run path writes schema metadata before DryRun is set
src/Migrator/MigrateAnywhere.cs:67
This early return does not make the public MigrateAnywhere dry-run path read-only: BaseMigrate and its constructor read provider.AppliedMigrations before a caller can set DryRun, and the legacy property creates/upgrades SchemaInfo. The main Migrator no longer uses this class, but direct callers still get database writes during dry runs; move initial history access behind IMigrationHistory or remove this path from the supported dry-run surface.
These callbacks are intentionally after commit, but their exceptions now escape outside the catch that calls logger.Exception. A failing AfterUp/AfterDown therefore loses the migration/version error log (while still aborting the runner); catch the callback separately, log it, and rethrow without attempting a rollback.
Public XML documentation describes outdated migration behavior
src/Migrator/Migrator.cs:199
The XML documentation immediately above this signature still describes executing Up()/Down() and honoring DryRun, but Plan only reads history and returns steps; the actual MigrateTo method below is now undocumented. Update the public API docs so callers are not told that planning performs migration work.
Log post-commit callback failures before rethrowing
src/Migrator/MigrationExecution.cs:56
These post-commit callbacks are outside the catch that calls logger.Exception, so an AfterUp/AfterDown failure is propagated without being recorded. Keep the no-rollback behavior, but wrap the callback in a catch that logs the exception before rethrowing it.
Preserve history snapshots passed to lifecycle callbacks
src/Migrator/Migrator.cs:215
history is mutated in the loop after being passed directly to Started, so a logger that retains the argument no longer sees the initial applied-version snapshot. The legacy BaseMigrate contract preserves that snapshot for both callbacks (BaseMigrate.cs:19-25), while Finished now also receives the mutated list at line 236; keep a separate pre-run copy for both callbacks.
The PR matrix exposed Firebird history creation occurring inside the first migration transaction. Initialize history before real execution while keeping planning read-only. Preserve explicitly scoped migrations and their history arguments for custom providers without IMigrationHistory. Retain failed transactions so rollback can recover a failed commit. Add regression tests for legacy scopes and transaction recovery, and enable CI on stacked codex PR bases. Validation: targeted runner tests; full provider matrix reruns on push.
Implement the three abstract metadata members on the isolated transaction test provider. This keeps the failed-commit recovery test independent of live database metadata. Validation: 31 targeted runner, loader and rollback tests passed.
Replace broad try/catch blocks that swallowed Assert.Fail with exact exception assertions, verify the migration's error message and assert Rollback was called immediately after execution. Remove never-triggered Dispose callback assertions from loader setup and date-version fixtures.
Validation: solution build and Unit 68 passed.
…ings
Restore LF endings in the two existing fixtures to avoid whole-file diff noise. Validation correction for 727d132: the completed Unit run had 70 passing tests, not 68; no test behavior changes in this formatting commit.
Defer legacy runner history access until navigation and use IMigrationHistory for read-only reads; constructors and DryRun no longer initialize history. Empty latest-version runs return before history access. Restore migration context around post-commit callbacks and clear it even when a callback fails. Update README scope semantics to match the explicitly requested effective-scope behavior.
Validation: solution build, Unit 70 passed, SQLite 145 passed with one pre-existing default-removal skip handled in the provider layer. New regressions cover legacy navigation, empty assemblies, callback context, durable history and callback failure cleanup. Addresses reviews 4071830715, 4071830792 and 4071830843; documents the deliberate scope policy discussed in 4071742900.
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
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.
Compute deterministic migration plans, isolate scopes, and make DryRun read-only through an additive history contract. Preserve legacy history-property behavior. Improve rollback, cache invalidation, caller connection ownership, and SQLite foreign-key restoration/integrity validation. Post-commit callbacks no longer trigger a misleading rollback. Validation: 68 unit tests and 141 SQLite tests passed; existing issue #139 test remains skipped. Server-backed CI is required before merge. First PR in the upgrade series; please review and merge manually.