gorm.io/driver/sqlserver

vendor/gorm.io/driver/sqlserver/create.go:55:33: not enough arguments in call to field.ValueOf have (reflect.Value) want (context.Context, reflect.Value) vendor/gorm.io/driver/sqlserver/create.go:61:35: not enough arguments in call to field.ValueOf have (reflect.Value) want (context.Context, reflect.Value)

gorm.io/driver/postgres

vendor/gorm.io/driver/postgres/migrator.go:337:24: cannot use column (type Column) as type gorm.ColumnType in append: Column does not implement gorm.ColumnType (missing AutoIncrement method)

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: jinzhu

Hi, please upgrade both driver and gorm to the latest version.

Comment From: oneinstack

Hi jinzhu: It's the latest version error: go.mod version:

gorm.io/driver/mysql v1.3.2
gorm.io/gorm v1.23.1

However the following version is fine:

gorm.io/driver/mysql v1.2.3
gorm.io/gorm v1.22.4 or  v1.22.5

Comment From: leo-934

I have faced a similar problem. Fixed when I change gorm version from 1.23.1 to 1.22.5 and mysql driver version to 1.2.2

Comment From: hielfx

I was facing the issue after executing go mod tidy but once I updated all my dependencies with go get -u ./... it started working again

Comment From: oneinstack

I update the latest gorm module with the following command:

rm -rf go.mod go.sum
go mod init "panel"
go mod tidy
go mod vendor

After running the error, the replacement version is fine.

go mod edit -require=gorm.io/driver/mysql@v1.2.3
go mod edit -require=gorm.io/gorm@v1.22.5
go mod vendor

Comment From: huuhait

another error Column does not implement gorm.ColumnType (missing AutoIncrement method

Comment From: tanteng

another error Column does not implement gorm.ColumnType (missing AutoIncrement method

how to solve it?

I have solved it by using previous history version, e.g. gorm.io/gorm v1.22.4

Comment From: a2htray

version conflict. Need to downgrade gom to v1.22.x.