In my Golang application, I am using a Name column in one of my structs. I want to save the text in its original form, so for example "User1", but "user1" would be considered to be duplicate. Is this possible with gorm and sqlite driver?
Manually overriding the column's datatype to 'text collate nocase' worked for me, like so:
type User struct {
ID int
Name string `gorm:"index:,unique;type:text collate nocase"`
}