From 21f6039bc9b59e70f608001aee7d35015f7c834a Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 6 Sep 2024 10:04:05 +0200 Subject: [PATCH] Add indices to repo table (#4087) --- server/model/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/model/repo.go b/server/model/repo.go index 8cbdb86db..36080f93e 100644 --- a/server/model/repo.go +++ b/server/model/repo.go @@ -23,11 +23,11 @@ import ( // Repo represents a repository. type Repo struct { ID int64 `json:"id,omitempty" xorm:"pk autoincr 'id'"` - UserID int64 `json:"-" xorm:"user_id"` + UserID int64 `json:"-" xorm:"INDEX 'user_id'"` ForgeID int64 `json:"forge_id,omitempty" xorm:"forge_id"` // ForgeRemoteID is the unique identifier for the repository on the forge. ForgeRemoteID ForgeRemoteID `json:"forge_remote_id" xorm:"forge_remote_id"` - OrgID int64 `json:"org_id" xorm:"org_id"` + OrgID int64 `json:"org_id" xorm:"INDEX 'org_id'"` Owner string `json:"owner" xorm:"UNIQUE(name) 'owner'"` Name string `json:"name" xorm:"UNIQUE(name) 'name'"` FullName string `json:"full_name" xorm:"UNIQUE 'full_name'"`