With the latest gorm and postgres the third automigration is causing an error in Postgres.
I've found this issue fixed: https://github.com/go-gorm/gorm/issues/5175
I think this is still a case in the latest version for Postgres and third auto migration (the second works fine): https://github.com/go-gorm/playground/pull/462
Originally posted by @CezaryTarnowski-TomTom in https://github.com/go-gorm/gorm/issues/5175#issuecomment-1090754104
Comment From: a631807682
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")
}