Fix unique constraint for orgs (#4923)

This commit is contained in:
Robert Kaussow 2025-03-03 17:33:19 +01:00 committed by GitHub
parent 0ecd57d2df
commit a3cc61b715
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,8 +17,8 @@ package model
// Org represents an organization.
type Org struct {
ID int64 `json:"id,omitempty" xorm:"pk autoincr 'id'"`
ForgeID int64 `json:"forge_id,omitempty" xorm:"forge_id"`
Name string `json:"name" xorm:"UNIQUE 'name'"`
ForgeID int64 `json:"forge_id,omitempty" xorm:"forge_id UNIQUE(s)"`
Name string `json:"name" xorm:"'name' UNIQUE(s)"`
IsUser bool `json:"is_user" xorm:"is_user"`
// if name lookup has to check for membership or not
Private bool `json:"-" xorm:"private"`