Also check for RepoID to be unique

This commit is contained in:
erik 2024-04-12 14:29:32 +02:00
parent f3e58f29b0
commit fb1d0df791

View file

@ -8,10 +8,9 @@ import (
)
// FollowingRepo represents a federated Repository Actor connected with a local Repo
// ToDo: We currently get database errors if different repos on the same server want to save the same federated repos in their list
type FollowingRepo struct {
ID int64 `xorm:"pk autoincr"`
RepoID int64 `xorm:"NOT NULL"`
RepoID int64 `xorm:"UNIQUE(federation_repo_mapping) NOT NULL"`
ExternalID string `xorm:"UNIQUE(federation_repo_mapping) NOT NULL"`
FederationHostID int64 `xorm:"UNIQUE(federation_repo_mapping) NOT NULL"`
URI string