diff --git a/pkg/model/user.go b/pkg/model/user.go index a03cac1..fd7c1b1 100644 --- a/pkg/model/user.go +++ b/pkg/model/user.go @@ -13,7 +13,7 @@ const ( type User struct { ID string `gorm:"primary_key" json:"id"` - Username string `gorm:"index:unique" json:"username"` + Username string `gorm:"uniqueIndex" json:"username"` Password string `json:"password"` Nickname string `json:"nickname"` TOTPSecret string `json:"-"`