aboutsummaryrefslogtreecommitdiff
path: root/internal/db/perms.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-06-25 18:07:39 +0800
committerGitHub <noreply@github.com>2022-06-25 18:07:39 +0800
commit083c3ee659c6c5542687f3bafae68cbc24dbc90f (patch)
tree0103bf3b5c5ebfccd368a7cb6a425a521fd669d9 /internal/db/perms.go
parent9df4e3ae3c555a86f691f0d78a43834842e77d8b (diff)
db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/perms.go')
-rw-r--r--internal/db/perms.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/perms.go b/internal/db/perms.go
index e3de37e0..a72a013a 100644
--- a/internal/db/perms.go
+++ b/internal/db/perms.go
@@ -32,7 +32,7 @@ var Perms PermsStore
// In case of an organization repository, the members of the owners team are in
// this table.
type Access struct {
- ID int64
+ ID int64 `gorm:"primaryKey"`
UserID int64 `xorm:"UNIQUE(s)" gorm:"uniqueIndex:access_user_repo_unique;not null"`
RepoID int64 `xorm:"UNIQUE(s)" gorm:"uniqueIndex:access_user_repo_unique;not null"`
Mode AccessMode `gorm:"not null"`