-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Description
Description
The sql-migrate
package fails to compile due to missing methods (SetHeader
and SetColWidth
) in the tablewriter.Table
type.
Environment
- Go version: go version go1.24.4 linux/arm64
- Operating system: Linux (e.g., Ubuntu 22.04)
- sql-migrate version: v1.8.0
Error Message
$ go tool github.com/rubenv/sql-migrate/sql-migrate up -config dbconf.yml
/go/pkg/mod/github.com/rubenv/[email protected]/sql-migrate/command_status.go:74:8: table.SetHeader undefined (type tablewriter.Table has no field or method SetHeader)
/go/pkg/mod/github.com/rubenv/[email protected]/sql-migrate/command_status.go:75:8: table.SetColWidth undefined (type tablewriter.Table has no field or method SetColWidth)
Steps to Reproduce
- Import or use
github.com/rubenv/[email protected]
- Run the following command in the terminal:
$ go tool github.com/rubenv/sql-migrate/sql-migrate up -config dbconf.yml
Expected Behavior
The package should compile successfully without any undefined method errors.
Attempted Solutions
- Ran
go mod tidy
- Cleared module cache with
go clean -modcache
- Updated dependencies with
go get -u ./...
- Tried rebuilding with
go clean -cache && go build
Additional Context
This appears to be a dependency version mismatch issue between sql-migrate
and the github.com/olekukonko/tablewriter
package. The methods SetHeader
and SetColWidth
seem to be missing or have been renamed in the current version of tablewriter.
Possible Fix
The issue might be resolved by:
- Updating the tablewriter dependency to a compatible version
- Or updating the method calls to use the correct API from the current tablewriter version
Related Files
Metadata
Metadata
Assignees
Labels
No labels