Migration versions are identifiers, but pending application used target - current as the number of migrations to execute. A database at version 29 with one pending migration at 20260929235340 applied that migration and then failed startup with ErrNoNextVersion.
Apply pending migrations one at a time until exhaustion, or until the requested positive cap has succeeded. Zero remains a no-op, negative values apply all pending migrations, and a cap larger than the remaining work succeeds with the actual applied count. Exported signatures, disabled-auto-migration rejection, and already-current behavior remain unchanged.
Keep status, per-migration, empty-migration, error, and completion logs, using real version IDs rather than initialVersion + appliedCount. Preserve provider/result errors and goose PartialError, including a migration that itself fails with a wrapped ErrNoNextVersion.
The small-gap and timestamp regressions fail against the original operation bodies with ErrNoNextVersion and pass with the fix.
go test -modfile=/tmp/migrate-pending-validation/go.mod -count=1 ./..., the corresponding -race run, and go vet pass; gofmt and git diff --check pass.
Changed operation functions have 100% statement coverage; no application databases or shared services were used.
The repository already replaces app/appcli/dbx with sibling directories absent in this fresh worktree, and its older published pins do not independently support the current module APIs. Validation used a temporary modfile resolving those replacements to compatible cached app 58e5e33e18da, appcli 60ecc69620df, and dbx 14686a83cb6c; existing production pins and relative replacements are unchanged. SQLite is a test-only import.
Migration versions are identifiers, but pending application used `target - current` as the number of migrations to execute. A database at version 29 with one pending migration at 20260929235340 applied that migration and then failed startup with `ErrNoNextVersion`.
Apply pending migrations one at a time until exhaustion, or until the requested positive cap has succeeded. Zero remains a no-op, negative values apply all pending migrations, and a cap larger than the remaining work succeeds with the actual applied count. Exported signatures, disabled-auto-migration rejection, and already-current behavior remain unchanged.
Keep status, per-migration, empty-migration, error, and completion logs, using real version IDs rather than `initialVersion + appliedCount`. Preserve provider/result errors and goose `PartialError`, including a migration that itself fails with a wrapped `ErrNoNextVersion`.
Validation:
- Disposable in-memory SQLite regressions cover contiguous, gapped, timestamped and mixed identifiers, blank/partial/current histories, caps, disabled auto-migration, counts, exhaustion, cancellation, failures, and structured logs.
- The small-gap and timestamp regressions fail against the original operation bodies with `ErrNoNextVersion` and pass with the fix.
- `go test -modfile=/tmp/migrate-pending-validation/go.mod -count=1 ./...`, the corresponding `-race` run, and `go vet` pass; `gofmt` and `git diff --check` pass.
- Changed operation functions have 100% statement coverage; no application databases or shared services were used.
The repository already replaces app/appcli/dbx with sibling directories absent in this fresh worktree, and its older published pins do not independently support the current module APIs. Validation used a temporary modfile resolving those replacements to compatible cached app 58e5e33e18da, appcli 60ecc69620df, and dbx 14686a83cb6c; existing production pins and relative replacements are unchanged. SQLite is a test-only import.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Migration versions are identifiers, but pending application used
target - currentas the number of migrations to execute. A database at version 29 with one pending migration at 20260929235340 applied that migration and then failed startup withErrNoNextVersion.Apply pending migrations one at a time until exhaustion, or until the requested positive cap has succeeded. Zero remains a no-op, negative values apply all pending migrations, and a cap larger than the remaining work succeeds with the actual applied count. Exported signatures, disabled-auto-migration rejection, and already-current behavior remain unchanged.
Keep status, per-migration, empty-migration, error, and completion logs, using real version IDs rather than
initialVersion + appliedCount. Preserve provider/result errors and goosePartialError, including a migration that itself fails with a wrappedErrNoNextVersion.Validation:
ErrNoNextVersionand pass with the fix.go test -modfile=/tmp/migrate-pending-validation/go.mod -count=1 ./..., the corresponding-racerun, andgo vetpass;gofmtandgit diff --checkpass.The repository already replaces app/appcli/dbx with sibling directories absent in this fresh worktree, and its older published pins do not independently support the current module APIs. Validation used a temporary modfile resolving those replacements to compatible cached app 58e5e33e18da, appcli 60ecc69620df, and dbx 14686a83cb6c; existing production pins and relative replacements are unchanged. SQLite is a test-only import.