aboutsummaryrefslogtreecommitdiff
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 808ef1a4..0aa6afda 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -141,7 +141,7 @@ func NewRepoContext() {
// Repository contains information of a repository.
type Repository struct {
- ID int64 `xorm:"pk autoincr"`
+ ID int64
OwnerID int64 `xorm:"UNIQUE(s)"`
Owner *User `xorm:"-"`
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
@@ -2055,7 +2055,7 @@ func (repos MirrorRepositoryList) LoadAttributes() error {
// Watch is connection request for receiving repository notification.
type Watch struct {
- ID int64 `xorm:"pk autoincr"`
+ ID int64
UserID int64 `xorm:"UNIQUE(watch)"`
RepoID int64 `xorm:"UNIQUE(watch)"`
}
@@ -2161,7 +2161,7 @@ func NotifyWatchers(act *Action) error {
// \/ \/
type Star struct {
- ID int64 `xorm:"pk autoincr"`
+ ID int64
UID int64 `xorm:"UNIQUE(s)"`
RepoID int64 `xorm:"UNIQUE(s)"`
}