mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-11 09:15:31 +02:00
fix unique constraints for repos and subgroups
This commit is contained in:
parent
b14092fe1c
commit
88fe681a5d
@ -9,6 +9,7 @@ func AddGroupColumnsToRepositoryTable(x *xorm.Engine) error {
|
||||
type Repository struct {
|
||||
LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"`
|
||||
GroupID int64 `xorm:"UNIQUE(g) INDEX DEFAULT 0"`
|
||||
OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"`
|
||||
GroupSortOrder int
|
||||
}
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
|
||||
@ -153,7 +153,7 @@ const (
|
||||
// Repository represents a git repository.
|
||||
type Repository struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
OwnerID int64 `xorm:"UNIQUE(s) index"`
|
||||
OwnerID int64 `xorm:"UNIQUE(s) UNIQUE(g) index"`
|
||||
OwnerName string
|
||||
Owner *user_model.User `xorm:"-"`
|
||||
LowerName string `xorm:"UNIQUE(s) UNIQUE(g) INDEX NOT NULL"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user