Closed crastinus closed 1 year ago
Disabling add constraint when constraint doesn't present in model but present in the database.
For example run automigrate for this Model
type Values struct { Name string `gorm:"unique"` MyVal bool } .... db.Migrator().AutoMigrate(&Values{})
Try again after removing constraint "unique" from Name field
type Values struct { Name string MyVal bool } .... db.Migrator().AutoMigrate(&Values{})
Got errors messages:
ERROR: relation "idx_valuses_name" already exists (SQLSTATE 42P07)
Disabling add constraint when constraint doesn't present in model but present in the database.
User Case Description
For example run automigrate for this Model
Try again after removing constraint "unique" from Name field
Got errors messages: