Skip to content
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

v1.23.x third automigrate causes error in postgres #5230

Closed
CezaryTarnowski-TomTom opened this issue Apr 6, 2022 · 1 comment
Closed

v1.23.x third automigrate causes error in postgres #5230

CezaryTarnowski-TomTom opened this issue Apr 6, 2022 · 1 comment
Labels
type:with reproduction steps with reproduction steps

Comments

@CezaryTarnowski-TomTom
Copy link

With the latest gorm and postgres the third automigration is causing an error in Postgres.

I've found this issue fixed:
#5175

I think this is still a case in the latest version for Postgres and third auto migration (the second works fine):
go-gorm/playground#462

Originally posted by @CezaryTarnowski-TomTom in #5175 (comment)

@github-actions github-actions bot added the type:with reproduction steps with reproduction steps label Apr 6, 2022
@a631807682
Copy link
Member

It work in latest version and playground table name is wrong.

-       if !DB.Table("auto_migrate_in_tx").Migrator().HasColumn(&AutoMigrateInTx{}, "third") {
+       if !DB.Table("auto_migrate_in_txes").Migrator().HasColumn(&AutoMigrateInTx{}, "third") {
                t.Fatalf("expecting the third column to be present")
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:with reproduction steps with reproduction steps
Projects
None yet
Development

No branches or pull requests

2 participants