-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration breaks in gorm.io/gorm 1.25.6 when using pgx driver for PostgreSQL #217
Comments
Same here. Rolling back to 1.25.5 fixes the issue here as well. Also reported to gorm. |
I made the issue to gorm already, you can see it here go-gorm/gorm#6812. The PR author is aware of it and said he is going to do a fix.
|
Hello, I made a fix for this. I don't know if my Pull Request will be merged but I haven't created a branch from this fix to allow making a replace in my go.mod file. Here is the patch commit:
Here is the diff for this specific branch: master...oxyno-zeta:gormigrate:issue-217-replace Have a good day ! |
@jhberges Thank you for reporting issue, @oxyno-zeta thank for the fix. |
Specifically the change go-gorm/gorm@v1.25.5...v1.25.6#diff-7539aa7c170a85138fa67c7846b65fda95a51169bcf8637d5961ea570307d755 will end up with an error
LastInsertId is not supported by this driver
.It seems to be the
hasReturning(*gorm.DB,bool)(bool, gorm.ScanMode)
ingorm.io/gorm/callbacks/helper.go:96
that breaks existing functionality.This file doesn't appear to be changed in the gorm.io version upgrade.
Might it look like that Gorm has started to require a
RETURNING
on the kind ofINSERT
/Create()
that gormigrate perform?Versions:
Go 1.21.5 linux/amd64
Gorm.io 1.25.6
Gormigrate 2.1.1 (v2 packages)
Works with versions:
Go 1.21.5 linux/amd64
Gorm.io 1.25.5
Gormigrate 2.1.1 (v2 packages)
The text was updated successfully, but these errors were encountered: