-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AutoMigrate failed (type "bigserial" does not exist) #4792
Comments
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 2 days if no further activity occurs. if you are asking question, please use the |
@enzofoucaud hello, can you provide a demo in https://github.com/go-gorm/playground? |
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 2 days if no further activity occurs. if you are asking question, please use the |
I try it when I have time |
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 2 days if no further activity occurs. if you are asking question, please use the |
@longlihale |
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 2 days if no further activity occurs. if you are asking question, please use the |
Hello, any news about this issue ? |
Any updates or work around? It seems to cause auto migration fail. |
I see see....:kissing_closed_eyes: |
Thanks, because I want to launch my app in prod :) |
I'm also facing this problem after updating gorm |
Which version ? I tested v1.22.2 & v1.21.16 |
After this updates in dependencies:
|
I’ve had this issue too (gorm.io/driver/postgres v1.2.2, gorm.io/gorm v1.22.2, Postgres server v14.1) and found that overriding the type of the primary key works as a workaround: type Something struct {
ID uint `gorm:"type:integer”`
…
} edit: that’s not entirely right, as it’ll need |
Also being affected here after upgrading from jinzhu/gorm to gorm/gorm. Tables in the database were created with the earlier version, now the new version's migration is trying to update them, but fails with this error message: |
GORM Playground Link
go-gorm/playground#391
Existing database without using GORM :
Model used with GORM :
Function that opens the database and migrates the data :
Error : 2021/10/19 15:14:19 /home/enzo/go/pkg/mod/gorm.io/driver/postgres@v1.1.2/migrator.go:252 ERROR: type "bigserial" does not exist (SQLSTATE 42704)
Description
Before using GORM I was using pgxscan and doing automatic migrations via a script.
Recently I switched to GORM which is more efficient but I get this error during the migration.
Why do I get this error?
Same problem here #4765
The text was updated successfully, but these errors were encountered: