From ce6e8ed8fe8bf82fef16996a7e0b90ce64755e08 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 21 May 2017 04:36:41 -0400 Subject: models: remove redundant tags for primary keys --- models/ssh_key.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models/ssh_key.go') 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 -- cgit v1.2.3