Your Question
I've a column definition like:
EventUuid string `json:"event_uuid" gorm:"type:varchar(60)"
There's no unique constraint. In my situation, I add a unique index on this table
ALTER TABLE ADD UNIQUE INDEX uk_eventuuid(event_uuid)
Then when I run db.Migrator().AutoMigrate(&m), the unique index is dropped
The document you expected this should be explained
Does this is a feature or bug?
Expected answer
If it's a feature, the docs need to mention it out. But I prefer it as an unexpected bug, because it removed my unique index.