Repository navigation
Use string for MigrationLog Duration instead of pgtype.Interval - #34
Merged
Merged
Conversation
Replace pgtype.Interval with string for the Duration field in MigrationLog to fix compatibility with non-pgx database drivers (e.g. lib/pq) that return []byte for interval columns. Adds TestScanMigrationLog to verify scanning works correctly with non-pgx drivers.
BolajiOlajide
force-pushed
the
fix/migration-log-duration-type
branch
from
March 4, 2026 21:15
dd018a3 to
d23492b
Compare
BolajiOlajide
added a commit
that referenced
this pull request
Mar 8, 2026
Updates CHANGELOG.md to include all releases since v0.0.11 through v0.1.2 and adds an Unreleased section covering recent work. ## Changes - Added entries for v0.0.11, v0.1.0, v0.1.1, v0.1.2 - Added detailed Unreleased section covering SQLite support (#27), database connection hardening (#29), MigrationLog duration fix (#34), and related bug fixes (#35-#39) - Fixed comparison links at the bottom to reference correct tags
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.
Closes #21
Replace
pgtype.Intervalwithstringfor theDurationfield inMigrationLogto fix compatibility with non-pgx database drivers (e.g. lib/pq) that return[]bytefor interval columns.Changes
internal/types/migration_log.go: ChangedDurationfield frompgtype.Intervaltostring, removing thepgxdependency from the types package.internal/runner/runner_test.go: AddedTestScanMigrationLogto verify scanning works correctly with non-pgx drivers that return[]bytefor interval columns.