-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
go-gorm/postgres
#157Labels
type:with reproduction stepswith reproduction stepswith reproduction steps
Description
GORM Playground Link
Description
do AutoMigrate twice, it will failed on uniqueIndex column
type User struct {
gorm.Model
Name string `gorm:"uniqueIndex;size:255"`
}
2023/02/04 17:37:52 /home/runner/go/pkg/mod/gorm.io/driver/postgres@v1.4.6/migrator.go:339 ERROR: relation "idx_users_name" already exists (SQLSTATE 42P07)
[0.881ms] [rows:0] ALTER TABLE "users" ADD CONSTRAINT "idx_users_name" UNIQUE("name")
main_test.go:18: Failed, migrate error: ERROR: relation "idx_users_name" already exists (SQLSTATE 42P07)
fffaraz, numaga94, axiangcoding, wimspaargaren and wuhan005
Metadata
Metadata
Assignees
Labels
type:with reproduction stepswith reproduction stepswith reproduction steps