aboutsummaryrefslogtreecommitdiff
path: root/models/ssh_key.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-05-21 04:36:41 -0400
committerUnknwon <u@gogs.io>2017-05-21 04:36:41 -0400
commitce6e8ed8fe8bf82fef16996a7e0b90ce64755e08 (patch)
tree59150762f9d8fde5fc1be56d4b704b5201aae641 /models/ssh_key.go
parent1755025e7f5e3b9b4fd46e37a5d74f8e192f7bd2 (diff)
models: remove redundant tags for primary keys
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index 18719390..814f0db0 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -43,7 +43,7 @@ const (
// PublicKey represents a user or deploy SSH public key.
type PublicKey struct {
- ID int64 `xorm:"pk autoincr"`
+ ID int64
OwnerID int64 `xorm:"INDEX NOT NULL"`
Name string `xorm:"NOT NULL"`
Fingerprint string `xorm:"NOT NULL"`
@@ -566,7 +566,7 @@ func RewriteAllPublicKeys() error {
// DeployKey represents deploy key information and its relation with repository.
type DeployKey struct {
- ID int64 `xorm:"pk autoincr"`
+ ID int64
KeyID int64 `xorm:"UNIQUE(s) INDEX"`
RepoID int64 `xorm:"UNIQUE(s) INDEX"`
Name string