I'd like to place multiple unique constraints on a single column in Gorm.
typeObject structure{
Z string `gorm: "unique_index:unique_a;unique_index:unique_b"`
A string `gorm: "unique_index:unique_a"`
B string `gorm: "unique_index:unique_b"`
}
The constraint does not apply to z when described above.
How can I describe it?
mysql go gorm
unique_index:unique_uid, unique_username
resolved.
--This answer is a community wik that asks questions posted as CommentReposted by i.
© 2024 OneMinuteCode. All rights reserved.