diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go index b6e187f7..95462a9e 100644 --- a/models/user.go +++ b/models/user.go @@ -44,7 +44,7 @@ const ( // User represents the object of individual and member of organization. type User struct { - ID int64 `xorm:"pk autoincr"` + ID int64 LowerName string `xorm:"UNIQUE NOT NULL"` Name string `xorm:"UNIQUE NOT NULL"` FullName string @@ -1087,7 +1087,7 @@ func SearchUserByName(opts *SearchUserOptions) (users []*User, _ int64, _ error) // Follow represents relations of user and his/her followers. type Follow struct { - ID int64 `xorm:"pk autoincr"` + ID int64 UserID int64 `xorm:"UNIQUE(follow)"` FollowID int64 `xorm:"UNIQUE(follow)"` } |